title: Accessibility of Session variable in Jinja2 with different name
body: <p>I want to show different header for person with logged in and person who logged out in Flask. Could I use the session variable directly in the jija2 template.</p>
  
  <p>I have used different name for session since , another session variable name used for sqlalchamy session. </p>
  
  <pre><code>from flask import session as usersession
  </code></pre>
  
  <p>I have tried accessing the usersession variable but it's saying undefined. but when I use the  <code>session['username']</code> I could access the session variable.</p>
  
  <p>further when I pop from usersession It's not popping from the session. Still session accessed in the tamplete has the <code>username</code> variable</p>
  
  <pre><code>usersession.pop('email', None)
  usersession.pop('type', None)
  
  
  jinja2.exceptions.UndefinedError: 'usersession' is undefined
  </code></pre>
  
  <p>My code is below .</p>
  
  <pre><code>{% if usersession['username'] is not  none %}
       {% include "store/headers/loginheader.html" %}
  {% else %}
       {% include "store/headers/logoutheader.html" %}
  {% endif %}
  </code></pre>