refactor main ctrl and signup