   (let [profile (atom {:username ""
                        :email    ""
                        :password ""})]
-    [:div.form-group {:style {:padding "1em"}}
-     [:p.text-center.bg-primary "Sign in"]
-     [:label "email:"]
-     [email-input-field profile]
-     [:label "password:"]
-     [passsword-input-field profile]
-     [:br]
-     [:div.checkbox
-      [:label
-       [:input {:type "checkbox"}] "remember me?"]]
-
-     [:br]
-     [:button.btn.btn-default {:type     "button"
-                               :on-click (fn [e]
-                                           (sign-in @profile)
-                                           (.preventDefault e))
-                               } "sign-in"]
-
-     [:button.btn.btn-default.pull-right {:type     "button"
-                                          :on-click #(secretary/dispatch! "/sign-up")
-                                          } "sign-up"]
-     [:br]
-     [:p.text-center
-      [:button.btn.btn-sm {:type     "button"
-                           :on-click #(secretary/dispatch! "/reset-password")}
-       "forgot password?"]]]))
+    [welcome-component-wrapper
+     [:div.form-group {:style {:padding "1em"}}
+      [:p.text-center.bg-primary "Sign in"]
+      [:label "email:"]
+      [email-input-field profile]
+      [:label "password:"]
+      [passsword-input-field profile]
+      [:br]
+      [:div.checkbox
+       [:label
+        [:input {:type "checkbox"}] "remember me?"]
+       [:p.pull-right
+        [:button.btn.btn-sm {:type     "button"
+                             :on-click #(secretary/dispatch! "/reset-password")}
+         "forgot password?"]]]
+      [:br]
+      [:button.btn.btn-default {:type     "button"
+                                :on-click (fn [e]
+                                            (sign-in @profile)
+                                            (.preventDefault e))
+                                } "sign-in"]
+
+      [:button.btn.btn-default.pull-right {:type     "button"
+                                           :on-click #(secretary/dispatch! "/sign-up")
+                                           } "sign-up"]]]))
 
 
 (defn sign-up-component []
   (let [profile (atom {:username ""
                        :email    ""
                        :password ""})]
-    [:div.form-group {:style {:padding "1em"}}
-
-     [:p.text-center.bg-primary "Create Account"]
-
-     [:label "username:"]
-     [username-input-field profile]
-     [:label "email:"]
-     [email-input-field profile]
-     [:label "password:"]
-     [passsword-input-field profile]
-
-     [:br]
-
-     [:button.btn.btn-default {:type     "button"
-                               :on-click #(secretary/dispatch! "/")
-                               } "sign-in"]
-
-     [:button.btn.btn-default.pull-right {:type     "button"
-                                          :on-click (fn [e]
-                                                      ;; (swap! form-state assoc :signing-up true)
-                                                      (sign-up @profile)
-                                                      (.preventDefault e))
-                                          } "sign-up"]]))
+    [welcome-component-wrapper
+     [:div.form-group {:style {:padding "1em"}}
+
+      [:p.text-center.bg-primary "Create Account"]
+
+      [:label "username:"]
+      [username-input-field profile]
+      [:label "email:"]
+      [email-input-field profile]
+      [:label "password:"]
+      [passsword-input-field profile]
+
+      [:br]
+
+      [:button.btn.btn-default {:type     "button"
+                                :on-click #(secretary/dispatch! "/")
+                                } "sign-in"]
+
+      [:button.btn.btn-default.pull-right {:type     "button"
+                                           :on-click (fn [e]
+                                                       ;; (swap! form-state assoc :signing-up true)
+                                                       (sign-up @profile)
+                                                       (.preventDefault e))
+                                           } "sign-up"]]]
+    ))
+
 (defn reset-password-component []
   (let [profile (atom {:username ""
                        :email    ""
                        :password ""})]
-    [:div.form-group {:style {:padding "1em"}}
-     [:p.text-center.bg-primary "Reset Your Password"]
-     [:label "email:"]
-     [email-input-field profile]
-
-     [:br]
-
-     [:p.text-center
-      [:button.btn.btn-default {:type     "button"
-                                :on-click (fn [e]
-                                            (reset-password @profile)
-                                            (.preventDefault e))
-                                } "reset"]]]))
-
-(defn reset-email-component-wrapper []
-  (sign-in-sign-up-base-component-wrapper [reset-password-component]))
+    [welcome-component-wrapper
+     [:div.form-group {:style {:padding "1em"}}
+      [:p.text-center.bg-primary "Reset Your Password"]
+      [:label "email:"]
+      [email-input-field profile]
+      [:br]
+      [:p [:button.btn.btn-default {:type     "button"
+                                    :on-click (fn [e]
+                                                (reset-password-email @profile)
+                                                (.preventDefault e))
+                                    } "reset"]]]]
+    ))
+
+(defn new-password-component []
+  (let [profile (atom {:username ""
+                       :email    ""
+                       :password ""})]
+    (welcome-component-wrapper
+      [:div.form-group {:style {:padding "1em"}}
+       [:p.text-center.bg-primary "New Password"]
+       [:label "password:"]
+       [passsword-input-field profile]
+       [:br]
+       [:button.btn.btn-default {:type     "button"
+                                 :on-click (fn [e]
+                                             ;; (swap! form-state assoc :signing-up true)
+                                             (reset-password-email @profile)
+                                             (.preventDefault e))
+                                 } "reset"]])))
 
 (defn show-loading-component []
   [:p.ball-loader.text-center {:style {:left   180
                                        :bottom 69}}])
-(defn sign-in-component-wrapper []
-  (let []
-    [sign-in-sign-up-base-component-wrapper [sing-in-component]]))
-
-(defn sign-up-component-wrapper []
-  (let []
-    [sign-in-sign-up-base-component-wrapper [sign-up-component]]))
-
 (defn email-verified-component []
-  [:div [:h1 "email verified"]])
+  [welcome-component-wrapper [:div
+                              [:h3.text-center
+                               [:u "Your email has been verified"]
+                               [:br]
+                               [:p [:a {:on-click #(secretary/dispatch! "/")} "you may now proceed to login"]]]]])
+
 ;; -------------------------
 ;; Routes
 


(defn post-reset-password [profile]
  (POST "http://localhost:3000/send-reset-password-email"
       ;; TODO: validate these fields
       {:params  {:email (:email profile)}
        :format  :json
        ;; :response-format :json
        ;; :keywords?
        :handler (fn [res]
                   (do
                     ;(swap! form-state assoc :show-loading (not (:show-loading @form-state)))
                     (println "res:" res)
                     (js/alert res))
                   )}))

;; -------------------------
;; Utility functions

  [:div [(session/get :current-page)]])

(secretary/defroute "/" []
                    (session/put! :current-page #'sing-in-component))


(secretary/defroute "/sign-up" []
                    (session/put! :current-page #'sign-up-component))

(secretary/defroute "/email-verified" []
                    (session/put! :current-page #'email-verified-component))

(secretary/defroute "/reset-password" []
                    (session/put! :current-page #'reset-password-component))

(secretary/defroute "/new-password" []
                    (session/put! :current-page #'new-password-component))

;; -------------------------
;; History
