Fixed bugs in LoginService.java