Improve some checks to the database
Improve some checks to the database

This is mostly about counting the number of users before and after the
tests.

ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube