def perform_visir_web_login(self, url, email, password):

        # Create the POST data with the parameters
        postvals = {"email" : email,
                    "password" : password }
        postdata = urllib.urlencode(postvals)

        # We need to use a Cookie processor to be able to retrieve
        # the auth cookie that we seek

        cp = urllib2.HTTPCookieProcessor()
        o = urllib2.build_opener( cp )
        #urllib2.install_opener(o)

        # Do the sel=login request. This request should yield a electro_lab cookie,
        # and if successful a logout link will be provided in the answer.
        r = o.open(url, postdata)
        content = r.read()
        if content.find('sel=logout') >= 0:
            if DEBUG: print "Found Logout link"
        else:
            print "WARNING: logout link not found!!!"
        r.close()

        # Do a sel=occasion query. This is most likely not necessary, but included
        # here to mirror the standard procedure as closely as possible.
        r = o.open("%s/experiment.php?sel=occasion&id=2" % self.basephpurl)
        r.read()
        r.close()

        # Do a sel=experiment_immediate query. This is the last query before the experiment
        # starts. It yields an exp_session query.
        r = o.open("%s/experiment.php?sel=experiment_immediate&id=2&http=1" % self.basephpurl)
        r.read()
        r.close()

        # Extract both relevant cookies; electro_lab and exp_session.
        cookies = dict(( (c.name, c.value) for c in cp.cookiejar ))

        if 'electro_lab' not in cookies:
            print "WARNING: could not find electro_lab cookie!!!"
            sys.stdout.flush()
        if 'exp_session' not in cookies:
            print "WARNING: could not find exp_session cookie!!!"
            sys.stdout.flush()

        electro_lab_cookie = cookies.get('electro_lab','')
        exp_session_cookie = cookies.get('exp_session','any_exp_session_%s' % random.random())

        if DEBUG: print "[DBG] LOGIN DONE. ELECTRO_LAB = %s AND EXP_SESSION = %s" % (electro_lab_cookie, exp_session_cookie)

        return electro_lab_cookie, exp_session_cookie
Performs a login through the specified visir web url.
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/experiments/visir_html5.py/VisirExperiment.perform_visir_web_login