Update zerodigitviewer_main.py

add condition of connection and login status