Requiring wp-login.php sends headers automatically
The login page is a horrible mess mixing functions with output the way it does. It makes projects like your unnecessarily difficult. It is actually better now that is used to be. You can cheat around the problem with output buffering: ob_start(); include(‘wp-login.php’); ob_end_clean(); Of course, the page still gets generated so it is consuming … Read more