In this authentication demo built with NodeJS, express & MongoDB, I used sessions and cookies to protect some areas of my application or avoid certain actions to be taken by some users. Besides authentication, I practiced authorization to allow specific users to see all data.