title: Python CookieJar saves cookie, but doesn't send it to website
body: <p>I am trying to login to website using urllib2 and cookiejar. It saves the session id, but when I try to open another link, which requires authentication it says that I am not logged in. What am I doing wrong?</p>
  
  <p>Here's the code, which fails for me:</p>
  
  <pre><code>import urllib
  import urllib2
  import cookielib
  
  cookieJar = cookielib.CookieJar()
  opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookieJar))
  
  # Gives response saying that I logged in succesfully
  response = opener.open("http://site.com/login", "username=testuser&amp;password=" + md5encode("testpassword"))
  
  # Gives response saying that I am not logged in
  response1 = opener.open("http://site.com/check")
  </code></pre>