force all pages to redirect to main page if user is not logged in