     ]
   )
   return
-app.get "/match/away", (req, res) ->
+app.get "/:token/match/away", (req, res) ->
+  auth req
   away = table.child('current_games')
   away.once('value', (nameSnapshot) ->
     game = nameSnapshot.val()

Firebase = require('firebase')
table = new Firebase('https://thetable.firebaseio.com/')

mytoken = require("./private-token")

FirebaseTokenGenerator = require("firebase-token-generator")
tokenGenerator = new FirebaseTokenGenerator(mytoken)
token = tokenGenerator.createToken({name: "table-api"}, {admin: true})

table.auth(token, (error) ->
  if(error)
    console.log("failed to auth", error)
   else
    console.log("authed.")
)

app = express()
app.get "/match", (req, res) ->
  current = table.child('current_games')
  current.once('value', (nameSnapshot) ->
    game = nameSnapshot.val()

    )
  )
  return
app.get "/:token/match/away/add", (req, res) ->
  auth req
  awayAdd = table.child('current_games')
  awayAdd.once('value', (nameSnapshot) ->
    game = nameSnapshot.val()
