          (if (identity-token)
            (GET "/api/user"
                 {:headers         {:identity (identity-token)}
-                 :error-handler   #(secretary/dispatch! "/")
+                 :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 rmfu-nav"}
          [:a {:href "/#/feed"} [:img.navbar-brand.feed-logo {:src "/images/rmfu-logo.png"}]]
           (if-let [profile (session/get :profile)]

  (:require [secretary.core :as secretary :include-macros true]
            [reagent.core :as reagent]
            [ajax.core :refer [GET]]
            [reagent.session :as session]))

(defn logout

                [:li {:className "nav-item"}
                 [: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"]]])]
         [:div [alert :error app-state 5000]]]
         )})))
