     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)


  #### Start the server ####
  # Wait to make sure owner is known before listening.
  setOwner( null, ->
    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}")
  )

        else
          done(null, false)
      else
        setOwner id, (e) ->
          if e then return done(e)
          done(null, {id})
    )
  )))
