fix linq exception in LoginController