prova cosi':
PS ho spostato session_start(); che va sempre in testa a tutto e ho aggiunto delle parentesi nell'if
Codice PHP:
<?php
session_start
();
$user "user";
$pass "password";

if ((
$_POST['username'] == $user) && ($_POST['password'] == $pass)) {
$_SESSION['login'] = "ok";
} else {
    echo 
"dati non corrispondenti";
header("Location: form.php");

}
?>