   (:require [secretary.core :as secretary :include-macros true]
             [reagent.core :as reagent]
             [ajax.core :refer [GET]]
+            [rmfu-ui.alert :refer [alert]]
             [reagent.session :as session]))
 
 (defn logout

                 [:a.nav-link.active {:href "/#/admin"} "Admin"]])]
             [:form.form-inline.navbar-form.pull-right
              [:button.btn.btn-success-outline {:type "button" :on-click #(logout)} "logout"]]]
            [:a.navbar-brand.feed-title {:href "/"} "FEED"])])})))

         (if (identity-token)
           (GET "/api/user"
                {:headers         {:identity (identity-token)}
                 :error-handler   (fn []
                                    (logout)
                                    (alert-update-display-fn "Session Expired" "Your session has expired, redirecting to the sign-in sreen")
                                    #(secretary/dispatch! "/"))
                 :response-format :json
                 :keywords?       true
                 :handler         (fn [res]
                                    (session/put! :profile res))})))
       :reagent-render
       (fn []
         [:div
         [:nav {:className "navbar navbar-light bg-faded"}
          [:img.navbar-brand.feed-logo {:href "/#/feed" :src "/images/rmfu-logo.png"}]
          (if-let [profile (session/get :profile)]
