* rewrote gatekeeper.js