        (javascript-tag (format "goboard.draw(\"goBoard\", %s, 1, function(x, y) {console.log(x, y)}, 18, 17);"
                                (stones-to-js (game :stones))))])}))
 
-(def login
+(def login-page
   (html5
    [:body
     [:div#login

              [:div#password (password-field "password")]
              (submit-button "login"))]]))

(defroutes main-routes
  (GET "/games/:id" [id :as {session :session}]
       (games-page session (Integer. id)))
  (GET "/login" [] login)
  (route/resources "/")
  (route/not-found "Page not found"))


(ns greybear.server
  (:import org.mindrot.jbcrypt.BCrypt)
  (:require [compojure.route :as route]
            [compojure.handler :as handler])
  (:use [ring.middleware.session :only [wrap-session]]
        [hiccup core element page]
        [hiccup.middleware :only [wrap-base-url]]
        [compojure.core :only [defroutes GET POST]]
        [cemerick.friend.credentials :only [hash-bcrypt bcrypt-verify]]
        [greybear.model :only [read-game]]))

(defn stones-to-js
