       (json-response {:message "wrong-password"} 400)))
 
   (POST "/rest/v2/login" {params :params headers :headers}
-        (.info logger (str headers))
         (let [username (:username params)
               password (:password params)
               new-location (if-let [referer (headers "referer")] referer "/m/index.html")]

                       "X-Ontrail-Status" "login-failed"}
             :body ""
             })))

  (POST "/rest/v1/login" [username password]
        (if (authenticate username password)

              {:status 301
               :headers {"Content-Type" "text/html"
                         "Location" new-location}
               :cookies {"authToken" {:value authToken :max-age (* 60 60 24 2 365) }
                         "authUser" {:value authUser :max-age  (* 60 60 24 2 365) }}
               :body ""
               })
            {:status 301
