Authorization middleware for Node.js and Javascript platform in general (with a little twist)