Can you try session_write_close()
here? There is a PHP configuration which is supposed to automatically do this for you after the script ends but your PHP might be configured differently.
<?php
unset($_SESSION['username']);
unset($_SESSION['id']);
session_write_close();
header('Location: index?page=home');
?>
For the sake of debugging could you try this:
<?php
echo $_SESSION['id'].' - '.$_SESSION['username'];
if(!$_SESSION['username'] && !$_SESSION['id']){
header ('Location: index?page=home');
}
?>