i do this myself, it's a simple matter of adding something like:
if (isset($_GET['from']))
{
echo "<h1>You're not logged in!</h1>\n";
echo "<p>The page you are coming from, ".$_GET['from'].", requires you to login. Please <a href=\"login.php\">do so now.</a>";
}
o course taht might not work if yo're using .php3....... haven't upgraded yet? that's pretty old......