'Login to server'

def login(self):

    self.token = get_token_file()
    if self.check_auth():
        return True
    data = make_args(login=self.username, password=quote(self.password))
    resp = self._call('login', data)
    if self.verbose:
        print resp
    (seq, status, parsed) = parse_reply(resp, ['token'])
    if ('token' in parsed):
        self.token = parsed['token']
    else:
        return False
    success = create_token_file(self.token)
    if success:
        return True
    else:
        return False
