extract a submethod for findUser so we can reuse repositoryconnection