Scusate, i dareste una mano a trovare l'errore?
sone tre paginette che non riesco a far andare.

prima:
<?php
session_start();
$_SESSION['username'] = $_POST['user'];
$_SESSION['userpass'] = $_POST['pass'];
$_SESSION['authuser'] = 0;

//verifica le informazioni relative a password e username
if (($_SESSION['username'] == 'Joe') and
($_SESSION['userpass'] == '12345')) {
$_SESSION['authuser'] = 1;
} else {
echo 'Sorry, but you don\'t have permission to view this page!';
exit();
{
?>
<html>
<head>
<title>Find my Favorite Movie!</title>
</head>

<body>
<?php
$myfavmovie = urlencode('Life of Brian');
echo "<a href=\"moviesite.php?favmovie=$myfavmovie\">";
echo "Click here to see information about my favorite movie!";
echo "</a>";
?>
</body>

</html>

seconda
<?php
session_start();

//verifica se l'utente ha fatto log-in con una password valida
if ($_SESSION['authuser'] != 1) {
echo 'Sorry, but you don\'t have permission to view this page!';
exit();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>My Movie Site</title>
</head>

<body>
<?php
echo 'Wellcame to our site, ';
echo $_SESSION['username'];
echo '!
';
echo 'My favorite movie is ';
echo $_GET['favmovie'];
echo '
';
$movierate = 5;
echo 'My movie rating for this movie is: ';
echo $movierate;
?>
</body>
</html>

terza
<?php
session_unset();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Please Log In</title>
</head>

<body>
<form method="post" action="movie1.php">


Enter your username:
<input type="text" name="user"/>
</p>


Enter your password:
<input type="password" name="pass"/>
</p>



<input type="submit" name="submit" value="Submit"/>
</p>
</form>
</body>
</html>

Vi ringrazio.