Added error handling to sign up