            ;; (Can we do this in a go block however?)
 
            (debugf "OAuth2 authorization server: Authorizing request")
-
-           (let [session (get-session-from-cookie req SESSION-ID (:session-store component))
-                 {response-type "response_type" client-id "client_id"} (:query-params req)
-                 r-t (or response-type (:response-type session))
-                 ]
-             (case r-t
-               "code" (authorize-client
-                       session
-                       component req store)
-
-               ;; Unknown response_type
-               {:status 400
-                :body (format "Bad response_type parameter: '%s'" response-type)}
-               )
-             ))
+           (if-not (exists? (:browser-session component) req)
+            (init-authentication component req)
+            (let [{response-type "response_type" client-id "client_id"} (:query-params req)
+                  r-t (or response-type (get-data (:browser-session component) req :response-type))
+                  ]
+              (case r-t
+                "code" (authorize-client
+                        (get-data (:browser-session component) req)
+                        component req store)
+
+                ;; Unknown response_type
+                {:status 400
+                 :body (format "Bad response_type parameter: '%s'" response-type)}
+                )
+              )))
          wrap-params
          wrap-schema-validation)
 

    (s/with-fn-validation
      (h req))))



(defn authorize-client [session component req store]
  (if-let [auth-interaction-session-result (get-result (:authenticator component) req)]
    ;; the session can be authenticated or maybe we are

       map->AuthorizationServer
       (<- (component/using
            [:access-token-store
             :browser-session
             :user-domain
             :client-registry
             :authenticator]))))
