fixed loooots of bugs in LoginController