Refactored UserController.