refactro users_controller