refactored routes to expose logged in user to all logged in routes and layout