   )
 
   #### Starting the server.
-  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}")
+  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}")
   app

        else
          done(null, false)
      else
        setOwner(id)
        done(null, {id})
    )
  )))


  # Attempts figure out if the wiki is claimed or not,
  # if it is it returns the owner, if not it sets the owner
  # to the id, if it is provided.
  setOwner = (id, cb) ->
    path.exists(OPENID, (exists) ->
      if exists
        fs.readFile(OPENID, (err, data) ->
          if err then throw err
          owner += data
          cb())
      else if id
        fs.writeFile(OPENID, id, (err) ->
          if err then throw err
          console.log("Claimed by #{id}")
          owner = id
          cb())
      else cb()
    )

  isClaimed = (cb) ->
    path.exists(OPENID, cb)
