The user logs in with the username not the email. Wrong query