Io faccio così:

Codice PHP:
if($_SESSION['auth'] == TRUE){
                 
header('refresh: 0; url=verifica_login.php');
    }
    else{    
        echo 
"<center>
        Inserire i dati di accesso


        <form action=\"verifica_login.php\" method=\"post\"name=\"form1\">
        <table border=\"1\">
        <tr> 
        <td align=\"center\">Login:</td>
        <td align=\"center\"><input type=\"text\" name=\"username\" size=\"40\"></td>
        </tr>
        <tr> 
        <td align=\"center\">Password:</td>
        <td align=\"center\"><input type=\"password\" name=\"password\" size=\"40\"></td>
        </tr>
        </table>
        

        <input type=\"submit\" value=\"Invia dati\">
        </form>
        </center>"
;
    } 
Ma se una volta loggatomi vado su login.php mi rivedo il form. Dove sbaglio?