 
 # Serve the list of meetings for /
 server.get '/dashboard', (request, response) ->
-    if user.username == 'guest' then return response.redirect '/signin'
+    console.log request.session
+    if request.session.auth.user.username == 'guest' then return response.redirect '/signin'
     return fs.readFile "#{process.cwd()}/templates/index.html", "utf-8", (err, data) ->
         document = jsdom.jsdom data
         window = document.createWindow()
         jQ = jQuery.create window
 
-        writeUser user, jQ
+        writeUser request.session.auth.user, jQ
 
         # Find RDFa entities and load them
         VIE.RDFaEntities.getInstances jQ "*"

        for clientId, clientObject of socket.clients
            if clientObject isnt client
                console.log "Forwarding data to #{clientId}"
                #clientObject.header('Access-Control-Allow-Origin', '*')
                clientObject.send data


cfg = JSON.parse fs.readFileSync "#{process.cwd()}/#{configFile}", "utf-8"

#user.username = 'guest'

session_store = new RedisStore({ maxAge: 24 * 60 * 60 * 1000})

writeUser = (user, jQuery) ->
