Added checkLoggedIn functino back to app.js to prevent flicker. Updated api route.