Handle login errors better