                 console.log("local strategy validating user #{username}")
                 done(null, {username:username})
 
-            passport.use(new LocalStrategy(verify))
+            passport.use(new PassportStrategy(verify))
 
             app.get '/auth/local', (req, res) ->
                 console.log('get login form')

                app.get "/auth/#{strategy}", passport.authenticate(strategy, {'scope': 'openid email profile'})

                app.get "/auth/#{strategy}/return", passport.authenticate(strategy, {failureRedirect: '/auth/local'}), (req, res) ->
                    console.log("/auth/google/return")
                    res.json(req.user)

                cb()

        async.parallel([init_passport_local, init_passport_google], cb)




init_passport = (app, cb) ->
    # Initialize authentication plugins using Passport
    passport = require('passport')
    dbg = (m) -> winston.debug("init_passport: #{m}")
    dbg()

    # initialize use of passport middleware
    app.use(passport.initialize())
