Make login_required work for main page.