Partial implemenation of safe login/logout of clients