         if req.method in ['GET', 'HEAD', 'OPTIONS']
             return next()
 
-        if yield accessService.check req.get 'X-Token'
+        if yield access.check req.get 'X-Token'
             return next()
 
         res


    app.get '/geocaches', async (req, res, next) ->
        res.set 'Content-Type', 'application/json'
        geocacheStream = yield geocacheService.getStream req.query, true
        geocacheStream
            .pipe JSONStream.stringify('[', ',', ']')
            .pipe res

    app.get '/geocache/:gc', async (req, res, next) ->
        geocache = yield geocacheService.get req.params.gc
        if not geocache?
            res.status 404
            res.send '404 - Geocache not found\n'
        else
            res.header 'ETag', etag geocache
            res.json geocache

    app.head '/geocache/:gc', async (req, res, next) ->
        geocache = yield geocacheservice.get req.params.gc
        if not geocache?
            res.status 404
            res.send '404 - Geocache not found\n'
        else
            res.header 'ETag', etag geocache
            res.end

    app.put '/geocaches', async (req, res, next) ->

        res.status 500
        res.send ':-('

    etag = (gc) ->
        return null if not gc?
        time = gc.DateLastUpdate
        match = time.match /^\/Date\((\d+)-(\d{2})(\d{2})\)\/$/
        return null if not match?
        seconds_epoch = parseInt(match[1]) / 1000
