refactoring, user registration