Fixed bugs in Loginserver