Added automatic clenup of cookies if they had invalid information.