I want to create a php page only for registered users with a package. It's possible to make this with a php script?

I had thought about doing something like this:

Code:
<?php      
include("include/config.php");

if($Login)
{echo "content to registered users only";}
else
{echo "content to unregistered users";}?>
It seems that "$Login" variable is not the same that appears in login.php file.

Someone knows how to do this?

Thanks in advance.