Improved method of fixing expired cookie handling.