Did you check that login.php language file for extra space before or after it's closing tag?
Then on your index.php file... before this is included:
<?php include "minilogin.php"; ?>
Make sure there is NO output. Again there can be no output to the page before the cookie is set.
So that include above should be the very first thing on the page.
If it's not, the authenticate function needs to be moved BEFORE any output, as it sets the cookies.
