finished user sign up and sign in logic