 
 
 (defroute o4register-list "/o4register" []
-  (let [onres (fn [json]
-                (let [dt (getdata json)]
-                  (set-key-value :o4registers (.-data dt))
-                  (set-key-value :total-pages (get-total-rec-no (.-pagesCount dt)))
-                  (set-key-value :page-location  [render-o4register (get-value! :o4registers)])))]
-    (set-key-value :is-searched-results false)
-    (http-get (str serverhost "o4registers?pageIndex="(dec (get-value! :current-page))"&pageSize=10") onres)))
+  (if (nil? (get-value! :user)) (set-page! [login])
+      (let [onres (fn [json]
+                    (let [dt (getdata json)]
+                      (set-key-value :o4registers (.-data dt))
+                      (set-key-value :total-pages (get-total-rec-no (.-pagesCount dt)))
+                      (set-page!  [render-o4register (get-value! :o4registers)])))]
+        (set-key-value :is-searched-results false)
+        (http-get-auth (str serverhost "o4registers?pageIndex="(dec (get-value! :current-page))"&pageSize=10") onres))))
 
 
 (defroute o4register-add-path "/o4register/add" []

        onres (fn [json] (let [d (first (getdata json))]
                          (set-o6-fields data-set d)))]
    (if (= selval "select") (reset-o6-fields data-set)
        (http-get (str serverhost "o6registers/"selval"/mutations")
                  onres))))


(defn o6-select

                   (set-key-value :villages dt)))]
    (set-key-value :villages [])
    (when-not ( >  1 (.-length eval))
      (http-get-auth (str serverhost "villages/search?name=" eval) onresp))))


(defn fieldbook-tags-template [data-set]
