Updates to UserControllerTest and related fixes/changes to Database and
UserController classes.