improve cookie handling for windows authentication.