handled errors for log in