It looks like you have applied the access restriction to the index.php page as well:
<?php
if (!isset($_SESSION)) {
session_start();
}
if (!WA_Auth_RulePasses("Logged in to users")){
WA_Auth_RestrictAccess("index.php");
}?>
This code is set to redirect to the index.php page if not logged in, if you apply this to the index.php page, you will end up with the endless loop you are describing.