 
      ::logout (fn [req]
                 (purge-session! (:session-store this) (get-session-id req APP-SESSION-ID))
-                {:status 200
-                 :body "You have logged out"
-                 })})
+                (if location-after-logout
+                  (redirect location-after-logout)
+                  {:status 200
+                   :body "You have logged out"}))})
 
   (routes [this] ["/" {"oauth/grant" {:get ::redirection-endpoint}
                        "logout" {:get ::logout}}])

                     :access-token-uri s/Str

                     :requires-user-acceptance? s/Bool
                     })
        map->WebClient)
   [:session-store :client-registry]))


(def APP-SESSION-ID "app-session-id")

(defrecord WebClient [store access-token-uri location-after-logout]
  component/Lifecycle
  (start [this]
    ;; If there's an :client-registry dependency, use it to
