   (routes [this] ["" (vec (keep #(when (satisfies? BidiRoutesProvider %) (routes %)) (vals this)))])
   (context [this] (or
                    (first (keep #(when (satisfies? BidiRoutesProvider %) (context %))
-                                ((juxt :protector :user-authenticator :http-session-store) this)))
+                                ((juxt :login-form :user-authenticator :http-session-store) this)))
                    ""))
 
   BidiRoutesProtector

(defn new-default-protection-system [& {:as opts}]
  (s/validate new-default-protection-system-schema opts)
  (map->ProtectionSystem
   {:protector (if-let [boilerplate (:boilerplate opts)]
                 (new-login-form :boilerplate boilerplate)
                 (new-login-form))
    :user-authenticator (component/using (new-user-domain) [:password-store])
    :password-store (new-password-file (:password-file opts))
    :http-session-store (new-atom-backed-session-store
                         (or (:session-timeout-in-seconds opts)
                             (* 60 60) ; one hour by default
                             ))}))

;; Now that we have a protection system, we want the ability to create

(defrecord ProtectedBidiRoutes [routes context]
  component/Lifecycle
  (start [this]
    (let [protection (get-in this [:protection-system])
          routes (cond-> routes
                         (fn? routes) (apply [this])
                         protection ((partial protect-bidi-routes protection)))]
      (assoc this :routes routes)))
  (stop [this] this)

