Fixed resolving of user in username authentication.