added event listener for inapp browser exit