I think i got it working again, both in FF and IE.
Checked in FF and waited for 3 hours and still logged in.
Removed && ($cookies_on == true)) in the login.php and application_top.php.
Also removed the testcookie code.
The settings in includes/configure.php are :
define('HTTP_SERVER', 'http://www.yourdomain.com/');
define('HTTPS_SERVER', 'https://www.yourdomain.com/');
define('ENABLE_SSL', true);
define('HTTP_COOKIE_DOMAIN', 'www.yourdomain.com');
define('HTTPS_COOKIE_DOMAIN', 'www.yourdomain.com');
define('HTTP_COOKIE_PATH', '/');
define('HTTPS_COOKIE_PATH', '/');
As far as i remember these are the only changes i made.