     (login-handler local-state)))
 
 (defn- form-username [value local-state]
-  (comp/form-control
-    {:margin    "normal"
-     :required  true
-     :fullWidth true}
-    (comp/input-label
-      {:htmlFor "user"
-       :key     "Swarmpit-login-username-input-label"} "User")
-    (comp/input
-      {:id           "user"
-       :key          "Swarmpit-login-username-input"
-       :name         "user"
-       :autoComplete "user"
-       :autoFocus    true
-       :value        value
-       :onChange     (fn [event]
-                       (swap! local-state assoc :username (-> event .-target .-value)))})))
+  (comp/text-field
+    {:id              "user"
+     :key             "Swarmpit-login-username-input"
+     :label           "Username"
+     :variant         "outlined"
+     :fullWidth       true
+     :required        true
+     :autoComplete    "user"
+     :autoFocus       true
+     :value           value
+     :onChange        (fn [event]
+                        (swap! local-state assoc :username (-> event .-target .-value)))
+     :InputLabelProps {:shrink true}}))
 
 (defn- form-password-adornment [local-state]
   (let [show-password? (:showPassword @local-state)]

      (comp/mui
        (comp/paper
          {:className "Swarmpit-login-paper"}
          (comp/avatar
            {:className "Swarmpit-login-avatar"
             :key       "Swarmpit-login-avatar"
             :alt       "Swarmpit logo"
             :src       "/img/swarmpit-transparent.png"})

          ;(html
          ;  [:img {:src    "img/swarmpit.png"
          ;         :width  "80px"
          ;         :height "80px"}])

          (comp/typography
            {:variant   "headline"
             :key       "Swarmpit-login-text"
             :className "Swarmpit-login-text"} "Welcome!")
          (html
            [:form.Swarmpit-login-form {:key "Swarmpit-login-form"}
             (when (not-empty message)

(ns swarmpit.component.page-login
  (:require [material.icon :as icon]
            [material.component :as comp]
            [swarmpit.component.state :as state]
            [swarmpit.url :refer [dispatch!]]
            [swarmpit.storage :as storage]
