handle login errors better