           res.locals.sd.COLLECTOR_PROFILE = collectorProfile.toJSON()
           res.render 'pages/complete/templates/index'
 
-        .catch (err) ->
-          console.log err
-          next err
+        .catch next

      Promise
        .all [
          user.fetch()
          collectorProfile.fetch data: access_token: user.get 'accessToken'
        ]

        .then ->

{ extend } = require 'underscore'
Promise = require 'bluebird-q'

module.exports = (page) ->
  middleware:
    isLoggedIn: (req, res, next) ->
      unless req.user?
        return res.redirect page.paths.show

      next()

  get:
    landing: (req, res, next) ->
      page
        .get()
        .then (data) ->
          res.locals.sd.SHOW_PATH = page.paths.show
          res.render 'pages/landing/templates/index', extend data,
            paths: page.paths

        .catch next

