Strip whitespace in usernames

whitespaces in username is not handled gracefully and will return a general error message instead of "incorrect username or password" message, so better trim all usernames before starting the authentication.