fixed logging off, added sendMsgToParty function in server