add basic error handling to signup and login