Cookie domain auto detection improvements