added additional cookie validation to prevent issues with pre-1.5 applications