Use only the restrict if user group <> 4 rule instead of the using both the restrict if and allow if conditions.
If you are still having a problem, add the following code to the page that you get redirected to:
<?php
if(!session_id()) session_start();
var_dump($_SESSION);
?>
This will show all of the session variables that are set and what their values are for debugging purposes.


