Try the following:
Open login.php
On lines 53 and 54 you'll see the following two lines
[php]
setcookie("username", $username);
setcookie("password", $password);
[/php]
Change with the following:
[php]
setcookie("username", $username, 3600, '/tools/stats/', 'www.domain.com');
setcookie("password", $password, 3600, '/tools/stats/', 'www.domain.com');
[/php]
You'll obviously need to tweak parts of that.
Give it a try and let me know what happens.
David