         (javascript-tag
          (str "messages = " (json/write-str messages :value-fn timestamp-to-string)
               ";\nuser = " (json/write-str user)
+              ";\nsession = " (json/write-str (:session req))
               ";\ntopics = " (json/write-str (get-topics {:param 42} 
                                                          {:row-fn (fn [row]
                                                                     (update-in row [:users] #(seq (.getArray %))))}))

                              :password password
                              :name username})
         session (-> (:session request)
                     (assoc :email email))]
     (-> (redirect (get-in request [:query-params :next] "/"))
         (assoc :session (assoc session :identity (:id user) :email (:email user)))))))


    (html5
     [:div
      [:a {:href "/login"} "login"]
      [:br]
      [:a {:href "/register"} "register"]]
     [:div {:id "app"}])))

