     app.use(express.session({ secret: 'notsecret'}))
     app.use(passport.initialize())
     app.use(passport.session())
+    app.use(errorHandler)
     app.use(app.router)
     app.use(express.static(argv.c))
     app.use(openIDErr)

    action = JSON.parse(req.body.action)
    # Handle all of the possible actions to be taken on a page,
    actionCB = (e, page, status) ->
      if e then throw e
      if status is 404
        res.send(page, status)
      console.log page if argv.debug


  #### Start the server ####
  # Wait to make sure owner is known before listening.
  setOwner( null, (e) ->
    # Throw if you can't find the initial owner
    if e then return throw e
    app.listen(argv.p, argv.o if argv.o)
    console.log("Smallest Federated Wiki server listening on #{app.address().port} in mode: #{app.settings.env}")
  )
