added functionality to userFactory to create new user instances with tests