refactor sign in and sign up features