code: def login(self, login, password):
          
          props = {'login_id': login, 'password': password}
          p = requests.post(self.url + '/users/login', data=json.dumps(props))
          self.token = p.headers["Token"] # Store the token for further requests
          self.get_team_id()
          return json.loads(p.text)
docs: Login to the corresponding (self.url) mattermost instance.