'Inform the server that we are done with the connection.
This command is allowed in any state of connection.
@rtype: C{Deferred}
@return: A deferred whose callback will be invoked with None
when the proper server acknowledgement has been received.'

def logout(self):

    d = self.sendCommand(Command('LOGOUT', wantResponse=('BYE',)))
    d.addCallback(self.__cbLogout)
    return d
