Factory for userRepository