added check due to fact that Dialog is destroyed in case Authentication cancel