     (redirect-to-profile-deleted)))
 
 (defn redirect-to-profile [user]
-  (assoc (r/redirect (path :show-profile)) :session {:user user
-                                                     :access_token (:token (token/create-token nil user))}))
+  (assoc (r/redirect (routes/path :show-profile)) :session {:user user
+                                                            :access_token (:token (cl-token/create-token nil user))}))
 
 (defn redirect-to-profile-created [user]
-  (assoc (r/redirect (path :show-profile-created)) :session {:user user
-                                                             :access_token (:token (token/create-token nil user))}))
+  (assoc (r/redirect (routes/path :show-profile-created)) :session {:user user
+                                                                    :access_token (:token (cl-token/create-token nil user))}))
 
 (defn redirect-to-profile-deleted []
-  (assoc (r/redirect (path :show-profile-deleted)) :session nil))
+  (assoc (r/redirect (routes/path :show-profile-deleted)) :session nil))
 
 (defn show-registration-form [request]
-  (html-response (register/registration-form request)))
+  (sh/html-response (register/registration-form request)))
 
 (defn preserve-session [response request]
   (-> response

(ns stonecutter.controller.user
  (:require [clauth.client :as client]
            [clauth.token :as token]
            [ring.util.response :as r]
            [clauth.endpoints :as ep]
            [stonecutter.routes :refer [routes path]]
            [stonecutter.view.sign-in :as sign-in]
            [stonecutter.validation :as v]
            [stonecutter.db.storage :as s]

    (and (:user session) (:access_token session))))

(defn redirect-to-authorisation [return-to user client-id]
  (if-let [client (cl-client/fetch-client client-id)]
    (assoc (r/redirect return-to) :session {:user user :access_token (:token (cl-token/create-token client user))})
    (throw (Exception. "Invalid client"))))

(defn register-user [request]
