Fixed logic in UserService.