in actual fact, that behavior is as designed, since the restrict access is used to perform the redirect
On logging in, it will try to go to the last restricted page.
the work around would be to hard code the redirect on the logout page rather than using the restrict access as previously sugested:
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
header('Location: ../index.html');
}
?>