refactor user sign up and sign in