title: AttributeError: 'SecureCookieSession' object has no attribute 'Session'
body: <p>I am getting the Error <code>AttributeError: 'SecureCookieSession' object has no attribute 'Session'</code>. I want to create token based authentication. I am getting token through through some servie, which is not my concern, but problem is that I am getting attribute error.</p>
  
  <pre><code>from flask import session, abort
  from functools import wraps    
  app =Flask(__name__)    
  def authenticated_resource(function):
      @wraps(function)
      def decorated(*args, **kwargs):
          if session.get("authenticated"):
              return function(*args, **kwargs)
          return abort(403) # unauthenticated
      return decorated  
  @app.route('/login', methods=['GET', 'POST'])
  def login():
    error=None
    if request.method=='POST':
      if request.form['username']!='admin' or request.form['password']!='1234':
        error ='Invalid Credentials. Please try again.'
      else:          
        username=request.form['username']
        password=request.form['password']
        print 'username=', username
        print 'password=', password          
        auth_url='http://192.168.206.133:5000/v2.0'
        token = getToken(username=username, password=password, tenant_name=tenant_name)
  
        session["authenticated"] = True
        session["auth_token"] = token_dict
  
        return redirect(url_for('getstats'))
    return render_template('login.html', error=error)
  
  @app.route('/metering')
  @authenticated_resource
  def getstats():
      token =session.get("auth_token")
      print 'token=',token
      return render_template('metering.html') 
  
  @app.route('/projects')
  def get_projects():
      auth=v2.Password(auth_url="http://192.168.206.133:5000/v2.0/", username="admin", password="1234", tenant_id='020377f522324546b072af92862e6466')
      sess=session.Session(auth=auth,verify=False)
      nova = client.Client(2, session=sess)
      instances =nova.servers.list()  
      def serializer(m):
        ret={}
        ret['Name']=m.name
        ret['Id']= m.id
        return ret
      context ={      
        'instances': [serializer(m) for m in instances],
        'project':[{'Id':'project', 'Name':'project'}] # Here added project option for group_by select option, 
         #previously It was showing only instance option, but now it is also show project option
      }
      return jsonify(context)
  
  
  
  if __name__ == '__main__':
     app.secret_key='super secret key'
     #app.config['SESSION_TYPE']='filesystem'
     app.debug= True
     app.run(host='0.0.0.0',port=5001)
  </code></pre>
  
  <p><strong>Trace of Full Error</strong></p>
  
  <pre><code>Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
      return self.wsgi_app(environ, start_response)
    File "/usr/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
      response = self.make_response(self.handle_exception(e))
    File "/usr/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
      reraise(exc_type, exc_value, tb)
    File "/usr/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
      response = self.full_dispatch_request()
    File "/usr/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
      rv = self.handle_user_exception(e)
    File "/usr/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
      reraise(exc_type, exc_value, tb)
    File "/usr/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
      rv = self.dispatch_request()
    File "/usr/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
      return self.view_functions[rule.endpoint](**req.view_args)
    File "/home/vagrant/flaskhorizon/flaskhorizon/flaskhorizon.py", line 140, in get_projects
      sess=session.Session(auth=auth,verify=False)
    File "/usr/lib/python2.7/site-packages/werkzeug/local.py", line 338, in __getattr__
      return getattr(self._get_current_object(), name)
  AttributeError: 'SecureCookieSession' object has no attribute 'Session'
  </code></pre>