1st phase refactor signin/signup