Userrepository refactor