 (ns cadence.views.landing
   (:require [cadence.views.common :as common]
             [cadence.model :as model]
-            (noir [response :as resp]
-                  [session :as sess]))
+            [cadence.model.flash :as flash]
+            [cemerick.friend :as friend]
+            [noir.response :as resp])
   (:use noir.core
         hiccup.core
         hiccup.page-helpers))

    [:div.page-header [:h1 "Cadence"]]
    [:p "Welcome to cadence"]))

(defpage login-page "/login" []
  (common/layout
    [:div.page-header [:h1 "Login"]]
    (common/default-form

       {:type "password" :name "Password"}]
      [{:value "Log In"}])))

(defn- clear-identity [response]
  (update-in response [:session] dissoc ::identity))

(defpage logout "/logout" []
  (flash/put! :success "You have been logged out.")
  (clear-identity (resp/redirect "/")))

(defpage signup "/signup" []
  (common/layout
