reworked for passport.js