moved all the login checking code into app.js