better error when login fails