Added handling of errors in LoginRequest.