def authenticate(email, password):
    # It should redirect to form with hidden fields containing all necessary
    # tokens to authenticate.
    response = urllib2.urlopen('{}/beginsignin'.format(AUTH_PAGE))
    html = response.read()
    # Parse auth form fields.
    data = re.findall(r'input.+?name="(.+?)".+?value="(.+?)"', html)
    query = dict(data)
    query.update({
        'email': email,
        'password': password,
        'create': 0,  # Force password authentication.
    })
    return urllib2.urlopen(response.url, urllib.urlencode(query))
Authenticate using mturk worker account. This should be done after
dataset/ETHPy150Open ipeirotis/Mturk-Tracker/app/mturk/main/management/commands/crawler/auth.py/authenticate