First implementation of the user repository and used in the users controller api methods