Fix error in logAttempt where user is searched for with an 'and where' clause over username and email, but same credential is passed for both values.