I have some pages that need to be logged in before they can be used, but I don't know how to encapsulate this component to achieve the purpose