I was originally requiring main.inc.php in my hacked loginpal.php which was resulting in the headers already sent errors (still don't know why). But when I moved the require to my site's main index.php (where loginpal.php is included) then all is well.
I'm just curious as to why you authenticate the user? Doesn't authentication occur by requiring main.inc.php?
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.