Adds test to check for downcasing of User email in db
Refactors User model