Now handles login errors