Refactored the user service