Are you checking to make sure the cookies are set before you process the page that you want secured?
if($HTTP_COOKIE_VARS["cookiename"]) {
//your page's code in here
} else {
echo "You are not logged in, <a href="login.php">go here</a>";
}
Something along those lines should work fairly well... Be sure to replace "cookiename" with your cookie's name, and customize that error message 😉
-Josh