title: Flask: session data is set but can't retrieved
body: <p>I can set session data
  /json"</p>
  
  <pre><code>me@air9:28:18 ⮀ ~ ⮀ curl -v -X POST http://127.0.0.1:5000 -d '{"email": "user@email.com", "password": "p"}' -H "Content-Type: application/json"
  * About to connect() to 127.0.0.1 port 5000 (#0)
  *   Trying 127.0.0.1...
  * connected
  * Connected to 127.0.0.1 (127.0.0.1) port 5000 (#0)
  &gt; POST / HTTP/1.1
  &gt; User-Agent: curl/7.27.0
  &gt; Host: 127.0.0.1:5000
  &gt; Accept: */*
  &gt; Content-Type: application/json
  &gt; Content-Length: 44
  &gt;
  * upload completely sent off: 44 out of 44 bytes
  * HTTP 1.0, assume close after body
  &lt; HTTP/1.0 200 OK
  &lt; Content-Type: application/json
  &lt; Content-Length: 9
  &lt; Set-Cookie: session="DRRrrffY/WGHU80TJ++KY5UaoYU=?USER_TOKEN=UycuZUp3RndjRVJ3Q0FJQk1CZWVJY1pRVVNzSlpNSEo5cF9DZGw5Q1RaSGFUZU9PNTBObVp3U3lxanMyTzU2U3VtaEM4aXBKbXZtdXFNcExDVERiYVBzOUtIMF9maUJGQ0UudHA0NEsyd3ZxRWREaHlGQmw5cUNiclpVZnNFJwpwMQou"; Path=/; HttpOnly
  &lt; Server: Werkzeug/0.8.3 Python/2.7.2
  &lt; Date: Sun, 14 Apr 2013 16:28:32 GMT
  &lt;
  * Closing connection #0
  "success"%
  </code></pre>
  
  <p>Here is the code that retrieves session data</p>
  
  <pre><code>    try:
          print session
          user = load_token(session['USER_TOKEN'])
      except ValueError:
          return redirect(url_for('/'))
      except:
          print repr(sys.exc_info())
  </code></pre>
  
  <p>When I hit the following with curl</p>
  
  <pre><code>curl -v -b "session='DRRrrffY/WGHU80TJ++KY5UaoYU=?USER_TOKEN=UycuZUp3RndjRVJ3Q0FJQk1CZWVJY1pRVVNzSlpNSEo5cF9DZGw5Q1RaSGFUZU9PNTBObVp3U3lxanMyTzU2U3VtaEM4aXBKbXZtdXFNcExDVERiYVBzOUtIMF9maUJGQ0UudHA0NEsyd3ZxRWREaHlGQmw5cUNiclpVZnNFJwpwMQou'" http://127.0.0.1:5000/users/uuid/transactions
  </code></pre>
  
  <p>The server log prints</p>
  
  <pre><code>&lt;SecureCookieSession {}&gt;
  (&lt;type 'exceptions.KeyError'&gt;, KeyError('USER_TOKEN',), &lt;traceback object at 0x109994248&gt;)
  </code></pre>
  
  <p>What is that I am doing wrong?</p>
  
  <p>How can I get the session data back?</p>