Refactoring Unit 2 signup code