added cookie check for is logged in to app.js