docs: def _authenticate(self):
          """Authenticate user and generate token."""
          self.cleanup_headers()
          url = LOGIN_ENDPOINT
          data = self.query(
              url,
              method='POST',
              extra_params={
                  'email': self.__username,
                  'password': self.__password
              })
  
          if isinstance(data, dict) and data.get('success'):
              data = data.get('data')
              self.authenticated = data.get('authenticated')
              self.country_code = data.get('countryCode')
              self.date_created = data.get('dateCreated')
              self.__token = data.get('token')
              self.userid = data.get('userId')
  
              # update header with the generated token
              self.__headers['Authorization'] = self.__token