refactoring sign-up