fix error handling in sign up.