           (let [user (auth/user-from-cookie cookies)
                 comment (mutate/comment-ex user params)]
             (redirect (url "/ex/" (:id params))))
-          (redirect "/sp/login.html")))
+          (redirect "/s/login.html")))
 
   (GET "/sp/addex" {params :params cookies :cookies} ;;addex
        (let [user (auth/user-from-cookie cookies)]

  (GET "/sp" {cookies :cookies}
       (if (not= "nobody" (auth/user-from-cookie cookies))
         (redirect "/sp/latest/1")
         (redirect "/s/login.html")))
  
  )
  

     [:div.shortEx (-> ex :body utils/strip-html truncate)]]]
   ])

(defn as-link [url-fn name page]
  [:a.naviLink {:href (url-fn page)} (str name)])

(defn latest-paging [url-fn page current-count]
  (let [pages 1
        next-pages (if (> current-count 0) (range (inc page) (+ page (inc pages))) [])
        start-page (- page pages)
        prev-pages (if (> start-page 0) (range start-page page) (range 1 page))
        navigation  (vec (conj (concat (map (partial as-link url-fn "edellinen") prev-pages) 
                                       [[:span.currentPage (str " " page " ")]] 
                                       (map (partial as-link url-fn "seuraava") next-pages)) :div.pageNavi))]
    navigation))

(defn header [user]
