                                              :access_token ...token...}})
       (provided
         (s/authenticate-and-retrieve-user email password) => ...user...
-        (token/create-token nil ...user...) => {:token ...token...}))
+        (cl-token/create-token nil ...user...) => {:token ...token...}))
 
 (fact "user can register with valid credentials and is redirected to profile-created page, with user added to session"
       (-> (create-request :post "/register" register-user-params)

                                    :session {:access_token ...token... :user ...user...}})
        (provided
          (s/authenticate-and-retrieve-user email password) => ...user...
          (client/fetch-client "client-id") => ...client...
          (token/create-token ...client... ...user...) => {:token ...token...})))

(fact "if user logged out, access token and user email are removed from session"
      (let [return-to-url "/authorisation?client-id=whatever"]

            :session) => empty?
        (provided
          (s/authenticate-and-retrieve-user email password) => ...user...
          (cl-client/fetch-client "client-id") => ...client...
          (cl-token/create-token ...client... ...user...) => {:token ...token...})))

(fact "if user has client id but no return-to in session, throws an exception"
      (-> (create-request :post "/sign-in" sign-in-user-params)
