<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def has_logged_in(self):
 """Check whether the API has logged in"""

        r = self.http.get(CHECKPOINT_URL)
        if r.state is False:
            return True
        # If logged out, flush cache
        self._reset_cache()
        return False