Es sencillo: No debes mezclar $_SESSION con session_register.
de:
http://ar.php.net/session_register
Caution
If you are using $_SESSION (or $HTTP_SESSION_VARS), do not use session_register(), session_is_registered(), and session_unregister().
////////////
<? //controla.php
session_start();
if ($_SESSION["logueo"]!="SI"){
header ("Location: prueba.php");
exit();
}
?>
en cada pagina colocas:
<?
require("controla.php");
?>
<html>
<head></head>
<body>
aca va tu pagina
</body>
</html>
Y no te olvides de colocar donde consultas la db y verificas q el usuario existe:
<?
session_start();
$_SESSION["logueo"]= "SI";
$_SESSION["who_is"]= $_POST["nombre"];
header("Location:tu_pagina_qde inicio_login.php");
exit();
?>
Y cuando haces el logout. elimina todas las variables asi.
<?
session_unset();
session_destroy();
?>