                                 "or sign up"))
                (dom/form #js {:id "signup"
                               :style (display (= screen :signup))}
-                         (input owner :username "Choose a username")
-                         (input owner :email "Your email")
-                         (input owner :password "Choose a password" "password")
+                         (input :username "Choose a username"
+                                (handle-change owner :username))
+                         (input :email "Your email"
+                                (handle-change owner :email))
+                         (input :password "Choose a password"
+                                (handle-change owner :password)
+                                "password")
                          (dom/button
                           #js {:onClick (fn [e]
                                           (.preventDefault e)

       :url "/boards"
       :chan ch})))

(defn input [owner id placeholder & type]
  (dom/input #js {:type (or (first type) "text")
                  :id (name id)
                  :onChange (fn [e]
                              (om/set-state! owner id
                                             (.. e -target -value)))
                  :placeholder placeholder}))

(defn login-view [app owner {:keys [on-login]}]
  (reify

      (dom/div #js {:id "login-signup"}
               (dom/form #js {:id "login"
                              :style (display (= screen :login))}
                         (input :email "Your username or email"
                                (handle-change owner :email))
                         (input :password "Your password"
                                (handle-change owner :password)
                                "password")
                         (dom/button
                          #js {:onClick (fn [e]
                                          (.preventDefault e)
