                 port: @defaultPort
                 buffer: buffer
         else
-            res.redirect "/login#{req.url}"
+            res.redirect "/login#{req.url}?#{qs.stringify(req.query)}"
 
     # Redirect application, redirect request depening on app name.
     redirectAppAction: (req, res) =>

randomstring = require 'randomstring'
bcrypt = require 'bcrypt'
fs = require 'fs'
passport = require 'passport'
LocalStrategy = require('passport-local').Strategy
Client = require('request-json').JsonClient

            else
                res.send 404
        else
            res.redirect "/login#{req.url}?#{qs.stringify(req.query)}"

    # Redirect public side of application, redirect request depening on app
    # name.
