def METHOD_NAME(self):
    """Login method used for logging in before doing search and torrent downloads."""
    cookies = dict_from_cookiejar(self.session.cookies)
    if any(cookies.values()) and cookies.get('uid'):
        return True
    login_params = {
        'username': self.username,
        'password': self.password,
        'use_ssl': 1,
        'perm_ssl': 1
    }
    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 'Welcome back' in response.text:
        return True
    else:
        log.warning('Invalid username or password. Check your settings')
        return False