'Login'

def login(self):

    data = {'apikey': self.apikey, 'username': self.username, 'password': self.password}
    r = self.session.post((self.base_url + '/login'), json=data)
    r.raise_for_status()
    self.session.headers['Authorization'] = ('Bearer    ' + r.json()['token'])
    self.token_date = datetime.utcnow()
