chat service and logout bug