Wait for cas validation before closing client popup