code: def _is_logged_in(self):
          
          # if the user has not logged in in 24 hours, relogin
          if not self._http._has_session() or datetime.utcnow() >= self._lastlogin + timedelta(hours=24):
              return self._login()
          else:
              return {}
docs: Check whether or not the user is logged in.