def METHOD_NAME(self, username, password):
    login_popup = self._download_webpage(
        self._LOGIN_URL, None, 'Downloading login popup')
    def is_logged(webpage):
        return any(re.search(p, webpage) for p in (
            r'class=["\']welcome\b', r'>Sign Out<'))
    # already logged in
    if is_logged(login_popup):
        return
    login_form = self._hidden_inputs(login_popup)
    login_form.update({
        'ctl01$TemplateBody$WebPartManager1$gwpciNewContactSignInCommon$ciNewContactSignInCommon$signInUserName': username,
        'ctl01$TemplateBody$WebPartManager1$gwpciNewContactSignInCommon$ciNewContactSignInCommon$signInPassword': password,
        'ctl01$TemplateBody$WebPartManager1$gwpciNewContactSignInCommon$ciNewContactSignInCommon$RememberMe': 'on',
    })
    response = self._download_webpage(
        self._LOGIN_URL, None, 'Logging in',
        data=urlencode_postdata(login_form))
    if '|pageRedirect|' not in response and not is_logged(response):
        error = self._html_search_regex(
            r'(?s)<[^>]+class=["\']AsiError["\'][^>]*>(.+?)</',
            response, 'error message', default=None)
        if error:
            raise ExtractorError('Unable to login: %s' % error, expected=True)
        raise ExtractorError('Unable to log in')