Refactored the User controler