handle failed authentication and remove listener callback