 
   callback: () =>
     (req, res, next) =>
-      passport.authenticate(req.authproxy_domain, { successRedirect: '/', failureRedirect: '/authproxy/google' })(req, res, next)
+      passport.authenticate(req.authproxy_domain, { successRedirect: '/authproxy/land', failureRedirect: '/authproxy/google' })(req, res, next)
 
   checkDomain: =>
     (req, res, next) =>

    app.get('/authproxy/google', @redirect())
    app.get('/authproxy/google/return', @callback())
    app.get('/authproxy/user', ensureAuthed, @getUser())

    for appName, conf of config.apps
        prefix = if conf.maintainRoute then "" else conf.route

  res.writeHead(200);
  res.write(HeaderText, "binary")
  res.end()

takeoff = (req, res, next) =>
  (new Cookies(req, res)).set "Final-Destination", req.originalUrl

land = (req, res, next) =>
  res.redirect (new Cookies(req, res)).get "Final-Destination"

  ###
  res.writeHead(200);
  res.write("<body>Land"+req.originalUrl+"</body>", "binary")
  res.end()
  ###


class InternalDomain
