Fix reference error and missing message in LoginError