         @userManager = new UserManager()
         @instanceManager = new InstanceManager()
         configurePassport @userManager
-
-        @userManager.all (err, users) ->
-            @username = users[0].value.email if users.length > 0
 
         @app.enable 'trust proxy'
         @app.set 'view engine', 'jade'

    loginView: (req, res) =>
        @userManager.all (err, users) ->
            if users?.length > 0 and not err
                res.render 'login', username: @username
            else
                res.redirect 'register'


    # Routes for app redirections
    routes: {}

    constructor: ->
        @app = express()
        @server = httpProxy.createServer @app
