implements the remaining incomplete parts of the UserService, adds more unit tests