              :type        "password"
              :placeholder "Confirm password"
              :value (:confirm-password user)
-             :on-change   #(do (re-frame/dispatch-sync [:set-user-login (assoc user :confirm-password (-> % .-target .-value))])
+             :on-change   #(do (re-frame/dispatch-sync
+                                 [:set-user-login (assoc user :confirm-password (-> % .-target .-value))])
                                (if (= (:password user) (-> % .-target .-value))
                                  (re-frame/dispatch-sync [:set-form-errors nil])
                                  (re-frame/dispatch-sync [:set-form-errors {:error "Passwords missmatch"}])))}]]

             :placeholder "Email address"
             :value (:email user)
             :on-change   #(do (re-frame/dispatch-sync [:set-form-errors nil])
                               (re-frame/dispatch-sync [:set-user-login (assoc user :email (-> % .-target .-value))]))}]
    [:input {:class       "form-control"
             :type        "password"
             :placeholder "Password"
             :value (:password user)
             :on-change   #(do (re-frame/dispatch-sync [:set-form-errors nil])
                               (re-frame/dispatch-sync [:set-user-login (assoc user :password (-> % .-target .-value))]))}]]
   [:div
    [:p
     [:span "Or go to "]



(defn nav-bar [main-menu-visible]
  (let [menu-class (if (= main-menu-visible true)
                     "collapse navbar-collapse in"
                     "collapse navbar-collapse")]
    [:nav {:class "navbar navbar-inverse navbar-fixed-top"}
     [:div {:class "container"}
      [:div {:class "navbar-header"}
       [:a {:href "#/" :class "navbar-brand"} "TODOGO"]
       [:button {:class "navbar-toggle"
                 :type "button"
                 :on-click #(re-frame/dispatch
                             [:set-main-menu-visible (if (= main-menu-visible true) false true)])}
        [:span {:class "icon-bar"}]
        [:span {:class "icon-bar"}]
        [:span {:class "icon-bar"}]]]
