'Takes a username and password, validates it, and if successful
returns a random login token which must be used on subsequent
method calls.  The token will time out after a set interval if not
used.  Re-logging in permitted.'

def login(self, login_user, login_password):

    if (login_user == ''):
        if (login_password == self.shared_secret):
            return self.__make_token('<DIRECT>')
        else:
            utils.die(self.logger, 'login    failed')
    if self.__validate_user(login_user, login_password):
        token = self.__make_token(login_user)
        return token
    else:
        utils.die(self.logger, ('login    failed    (%s)' % login_user))
