Hi,
I have attached the 2 files in question. The Login page, when entering proper credentials loads the portalindex.php page before the credential are validated. The portalindex.php page throws an error to the user because the credentials are not validated (in time) before the redirect occurs.
I am trying to have the portalindex.php throw an error when the page is accessed from address bar (direct input) and have the redirect to the portalindex.php when the proper credentials are entered in the login.php page