refactor userService and registerService