# File lib/contacts/gmail.rb, line 11
    def real_connect
      postdata =  "ltmpl=yj_blanco"
      postdata += "&continue=%s" % CGI.escape(URL)
      postdata += "&ltmplcache=2"
      postdata += "&service=mail"
      postdata += "&rm=false"
      postdata += "&ltmpl=yj_blanco"
      postdata += "&hl=en"
      postdata += "&Email=%s" % CGI.escape(login)
      postdata += "&Passwd=%s" % CGI.escape(password)
      postdata += "&rmShown=1"
      postdata += "&null=Sign+in"
            
      time =      Time.now.to_i
      time_past = Time.now.to_i - 8 - rand(12)
      cookie =    "GMAIL_LOGIN=T#{time_past}/#{time_past}/#{time}"
      
      data, resp, cookies, forward, old_url = post(LOGIN_URL, postdata, cookie, LOGIN_REFERER_URL) + [LOGIN_URL]
      
      cookies = remove_cookie("GMAIL_LOGIN", cookies)
      
      if data.index("Username and password do not match")
        raise AuthenticationError, "Username and password do not match"
      elsif data.index("Required field must not be blank")
        raise AuthenticationError, "Login and password must not be blank"
      elsif data.index("errormsg_0_logincaptcha")
        raise AuthenticationError, "Captcha error"
      elsif data.index("Invalid request")
        raise ConnectionError, PROTOCOL_ERROR
      elsif cookies == ""
        raise ConnectionError, PROTOCOL_ERROR
      end
      
      cookies = remove_cookie("LSID", cookies)
      cookies = remove_cookie("GV", cookies)

      @cookies = cookies
    end