fixed error handling for login, signup and reset