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

        @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'

    # Routes for app redirections
    routes: {}

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