download and run with
git clone https://github.com/mjcleme/dbauth.git
cd dbauth
npm install
node auth_server.js
This comes from Chapter 26 of the book "Node.js, MongoDB, and AngularJS Web Development" http://proquest.safaribooksonline.com/book/programming/javascript/9780133844351/vi-building-practical-web-application-components/ch26_html
The original code is here https://github.com/bwdbooks/nodejs-mongodb-angularjs-web-development/tree/master/ch26