app.js now redirects to the login page if not logged in