 
 (defn render-navigation-bar-section
     "Renders whole navigation bar."
-    [word user-name]
+    [word user-name url-prefix]
     [:nav {:class "navbar navbar-inverse navbar-fixed-top" :role "navigation"}
         [:div {:class "container-fluid"}
             [:div {:class "row"}
                 [:div {:class "col-md-1"}
                     [:div {:class "navbar-header"}
-                        [:a {:href "/" :class "navbar-brand"} "zg"]
+                        [:a {:href url-prefix :class "navbar-brand"} "zg"]
                     ] ; ./navbar-header
                 ] ; col ends
                 [:div {:class "col-md-3"}
-                    (render-search-field word)
+                    (render-search-field word url-prefix)
                 ] ; col ends
                 [:div {:class "col-md-3"}
                     [:div {:class "navbar-header"}
-                        [:a {:href "/all-words" :class "navbar-brand"} "All words"]
-                    ] ; ./navbar-header
-                    [:div {:class "navbar-header"}
-                        [:a {:href "/active-words" :class "navbar-brand"} "Active words"]
-                    ] ; ./navbar-header
-                    [:div {:class "navbar-header"}
-                        [:a {:href "/deleted-words" :class "navbar-brand"} "Deleted words"]
+                        [:a {:href (str url-prefix "all-words") :class "navbar-brand"} "All words"]
+                    ] ; ./navbar-header
+                    [:div {:class "navbar-header"}
+                        [:a {:href (str url-prefix "active-words") :class "navbar-brand"} "Active words"]
+                    ] ; ./navbar-header
+                    [:div {:class "navbar-header"}
+                        [:a {:href (str url-prefix "deleted-words") :class "navbar-brand"} "Deleted words"]
                     ] ; ./navbar-header
                 ] ; col ends
                 [:div {:class "col-md-3"}
-                    (render-name-field user-name)
+                    (render-name-field user-name url-prefix)
                 ]
                 [:div {:class "col-md-1"}
                     [:div {:class "navbar-header"}
-                        [:a {:href "/users" :class "navbar-brand"} "Users"]
+                        [:a {:href (str url-prefix "users") :class "navbar-brand"} "Users"]
                     ] ; ./navbar-header
                 ] ; col ends
             ] ; row ends

(defn render-users
    [user-name statistic changes url-prefix]
    (page/xhtml
        (render-html-header nil)
        [:body
            [:div {:class "container"}
                (render-navigation-bar-section nil user-name)

                [:table {:class "table table-stripped table-hover" :style "width:auto"}
                    [:tr [:th "User name"]


(defn render-error-page
    "Render error page with a 'back' button."
    [word user-name message url-prefix]
    (page/xhtml
        (render-html-header "" url-prefix)
        [:body
            [:div {:class "container"}
                (render-navigation-bar-section word user-name url-prefix)
                [:div {:class "col-md-10"}
                    [:h2 "Sorry, error occured in zg"]
                    [:p message]
