                      :on-change #(reset! verbose? %)
                      :label "Show all?")
                     (when admin?
-                      (formatted-schema "Users" (:users @schema) (not @verbose?)))
-                    (formatted-schema "Payment Methods" (:payment-methods @schema) (not @verbose?))
-                    (formatted-schema "Currencies" (:currencies @schema) (not @verbose?))
-                    (formatted-schema "Categories" (:categories @schema) (not @verbose?))
-                    (formatted-schema "Vendors" (:vendors @schema) (not @verbose?))]]))))
+                      (formatted-schema "Users" (:users (<sub [:schema])) (not @verbose?)))
+                    (formatted-schema "Payment Methods" (:payment-methods (<sub [:schema])) (not @verbose?))
+                    (formatted-schema "Currencies" (:currencies (<sub [:schema])) (not @verbose?))
+                    (formatted-schema "Categories" (:categories (<sub [:schema])) (not @verbose?))
+                    (formatted-schema "Vendors" (:vendors (<sub [:schema])) (not @verbose?))]]))))
 
 (defn setup-panel []
-  (let [credentials (re-frame/subscribe [:credentials])]
-    (fn []
-      (if @credentials [config-panel] [login-panel]))))
+  (if (<sub [:credentials])
+    [config-panel]
+    [login-panel]))
+
 
 (defn wrap-page [page]
   [re-com/border

(def tight-field-width "11rem")
(def field-width "14rem")

(defn app-title []
  (let [name (re-frame/subscribe [:name])
        server (re-frame/subscribe [:server])]
    (fn []
      [re-com/title
       :label (str @name (when (= @server :development) " (local test server)"))
       :level :level1])))

(defn panel-title [label]
  [re-com/title :label label :level :level1])

      ;; [TODO] This gets the schema once when the program starts. This is probably wrong:
      ;; - I don't know if this is called at the best time or place
      ;; - No mechanism to get changed schema; especially, e.g., if a client is open for many days
      (>evt [:update-credentials])
      [re-com/v-box
       :children [[app-title]
                  [tabs-row]
