'Login and get perspective from remote PB server.
Currently the following credentials are supported::
L{twisted.cred.credentials.IUsernamePassword}
L{twisted.cred.credentials.IAnonymous}
@rtype: L{Deferred}
@return: A L{Deferred} which will be called back with a
L{RemoteReference} for the avatar logged in to, or which will
errback if login fails.'

def login(self, credentials, client=None):

    d = self.getRootObject()
    if IAnonymous.providedBy(credentials):
        d.addCallback(self._cbLoginAnonymous, client)
    else:
        d.addCallback(self._cbSendUsername, credentials.username, credentials.password, client)
    return d
