fix bugs in sign up and log in