Refactored users_controller