 
 # 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 "*"

    return

server.get '/signout', (request, response) ->
    user.username = 'guest'
    request.session.destroy();
    response.redirect '/about'


    return

server.get '/meeting/:uuid', (request, response) ->
    if request.session.auth.user.username == 'guest' then return response.redirect '/signin'
    console.log('open meeting: ' + request.params.uuid + ' - '+ request.session.auth.user.username );
    return fs.readFile "#{process.cwd()}/templates/meeting.html", "utf-8", (err, data) ->
        document = jsdom.jsdom data
        window = document.createWindow()
        jQ = jQuery.create window

        writeUser request.session.auth.user, jQ

        # Write the Meeting identifier into the DOM
        jQ('[typeof="rdfcal\\:Vevent"]').attr('about', request.params.uuid);
