         gui (:gui options)
         certfile (:certfile options)
         keyfile (:keyfile options)
+        userauth (:userauth options)
         keystore (if keyfile
                    {:keystore (ssl/key-store keyfile certfile)
                     :password (String. ^chars ssl/key-store-password)}

                         java.io.PushbackReader.)]
    (clojure.edn/read reader)))

; XXX add ring jsonp?
(defn- get-app [docroot db loader port]
  (-> cavm.views.datasets/routes
      (auth/wrap-google-authentication
       (str (local-url port) "/")
       "/code"
       (auth/load-users "users.txt")
       (load-edn-from "auth.config"))
      (wrap-trace :header :ui)
      (attr-middleware :docroot docroot)
      (attr-middleware :db db)

   [nil "--certfile FILE" "Cert file to use (requires --keyfile)"]
   [nil "--version" "Print version and exit"]
   ["-j" "--json" "Fix json"]
   [nil "--userauth" "Enable user-based authentication"]
   ["-t" "--tmp DIR" "Set tmp dir" :default tmp-dir-default]])

(defn- mkdir [dir]
