Rewrite downcase in user model and add new test to mixedcase