        (fact "user-email and access_token in session stay in session if user is logged in"
              (let [user-email "email@user.com"
                    user (storage/store-user! user-email "password")
-                   client-details (client/register-client "MYAPP" "myapp.com")
-                   access-token (token/create-token client-details user)
+                   client-details (cl-client/register-client "MYAPP" "myapp.com")
+                   access-token (cl-token/create-token client-details user)
                    request (-> (r/request :post "/authorisation")
                                (assoc :params {:client_id (:client-id client-details) :response_type "code" :redirect_uri "callback"})
                                (assoc-in [:session :access_token] (:token access-token))

               (:uid user) =not=> nil?)

         (fact "user email stays in the session after validating token"
               (get-in response [:session :user :email]) => user-email)))
       (fact "posting to authorisation endpoint redirects to callback with auth code"
             (let [user-email "email@user.com"
                   user (storage/store-user! user-email "password")
                   client-details (cl-client/register-client "MYAPP" "myapp.com")
                   access-token (cl-token/create-token client-details user)
                   csrf-token "CSRF-TOKEN"
                   request (-> (r/request :post "/authorisation")
                               (assoc :params {:client_id (:client-id client-details) :response_type "code" :redirect_uri "callback" :csrf-token csrf-token})
