          (resource
           {:id ::secret
            :access-control
-           {:realm "accounts"
-            :scheme "Custom"
+           {:scheme "Custom"
             :verify identity
             :authorization {:methods {:get [:and
                                             "accounts/view"
                                             "accounts/view"]}}}
-           :methods {:get "SECRET!"}}))}]]]
+           :methods {:get {:response (fn [ctx]
+                                       (html
+                                        [:h1 "Seek happiness"]
+                                        [:p [:a {:href (path-for @*router ::logout)} "logout"]]))
+                           :produces "text/html"}}
+           :responses {401 {:produces "text/html" ;; TODO: If we neglect to put in produces we get an error
+                            :response (fn [ctx]
+                                        (html
+                                         [:h1 "Sorry"]
+                                         [:p "You are not authorized yet"]
+                                         [:p "Please " [:a {:href (path-for @*router ::login)} "login" ]]))}}}))}]]]
 
     (catch Throwable e
       (errorf e "Getting exception on security example routes")

                            (when (= [user password] ["scott" "tiger"])
                              {:user "scott"
                               :roles #{"accounts/view"}}))
                  :authorization {:methods {:get true}}}})))]

      ["/cookie"


     :methods
     {:get
      {:produces "text/html"
       :response (html
                  [:div
                   [:style "* {margin:2px;padding:2px}"]
                   [:h1 "Login form"]
                   [:form {:method :post}
                    (for [{:keys [label type name]} fields]
                      [:div
                       [:label {:for name} label]
                       [:input {:type type :name name}]])
                    [:div [:input {:type :submit :name :submit :value "Login"}]]]])}
      
      :post
      {:parameters (login-form-parameters fields)
