refactoring for user service and home controller