def METHOD_NAME(self):
    """Login method used for logging in before doing search and torrent downloads."""
    if any(dict_from_cookiejar(self.session.cookies).values()):
        return True
    # Retrieve __RequestVerificationToken
    login_html = self.session.get(self.urls['login'])
    with BS4Parser(login_html.text, 'html5lib') as html:
        token = html.find('input', attrs={'name': '__RequestVerificationToken'}).get('value')
    login_params = {
        'Username': self.username,
        'Password': self.password,
        '__RequestVerificationToken': token,
        'RememberMe': True
    }
    response = self.session.post(self.urls['login'], data=login_params)
    if not response or not response.text:
        log.warning('Unable to connect to provider')
        return False
    if 'Erreur lors du login.' in response.text:
        log.warning('Invalid username or password. Check your settings')
        return False
    return True