'Authenicate with the myepisodes service and return a requests session
Return:
requests session
Raises:
PluginWarning if login fails
PluginError if http communication fails'

def _login(self, config):

    url = u'https://www.myepisodes.com/login.php'
    session = requests.Session()
    payload = {u'username': config[u'username'], u'password': config[u'password'], u'action': u'Login'}
    try:
        response = session.post(url, data=payload)
        if (u'login' in response.url):
            raise plugin.PluginWarning(u'Login    to    myepisodes.com    failed,    please    see    if    the    site    is    down    and    verify    your    credentials.', log)
    except requests.RequestException as e:
        raise plugin.PluginError((u'Error    logging    in    to    myepisodes:    %s' % e))
    return session
