<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def logout(self):
 """Logout of filemail and closing the session."""


        # Check if all transfers are complete before logout
        self.transfers_complete

        payload = {
            'apikey': self.config.get('apikey'),
            'logintoken': self.session.cookies.get('logintoken')
            }

        method, url = get_URL('logout')
        res = getattr(self.session, method)(url, params=payload)

        if res.status_code == 200:
            self.session.cookies['logintoken'] = None
            return True

        hellraiser(res)