I want to prevent non-registered users to view a page in my website,
For example, when a non-registered user clicks the history page, the
website site refuses to go there since he is not registered.
what is the best way to do it? And how to identify a user has already
logged in when he click the history page?