refactor users_controller