additional tests checking for downcased email and refactor