Refactor signup page. Write more tests