Basic error handling for login