     (if (fs/exists? build ) build bin)))
 
 (defroutes static-routes 
+  (GET "/login" [] (ring.util.response/file-response "assets/login.html" {:root (static-path)}))
   (route/files "/" {:root (static-path)}))
 
+(defroutes sessions
+  (friend/logout (ANY "/logout" request  (ring.util.response/redirect "/"))))
+
 (defroutes app-routes
-  static-routes system type environments actions jobs (friend/wrap-authorize users admin)
+  system type environments actions jobs sessions (friend/wrap-authorize users admin)
   (friend/wrap-authorize quotas admin) (route/not-found "Not Found"))
 
 (defn error-wrap

(defn compose-routes
  "Composes celetial apps" 
  [secured?]
  (let [rs (routes (swagger-routes version) (if secured? (sec/secured-app app-routes) app-routes) )]
    (if secured? 
      (force-https rs) rs)))


  "The api routes, secured? will enabled authentication"
  (-> (compose-routes secured?) 
      (wrap-swag) 
      (wrap-session {:cookie-name "celestial" :store (cookie-store)})
      (handler/api)
      (wrap-restful-format :formats [:json-kw :edn :yaml-kw :yaml-in-html])
      (mp/wrap-multipart-params)
