If your phone is not connected to the internet while you are making changes, it is possible that device configurations you make on the app will not be backed up to the internet. To prevent losing changes that are made, the app will not allow you to log out until the changes are backed up to the server. If you cannot log out for some reason, make sure the phone is connected to the internet to allow the backup to occur. Then, you should be able log out normally.
Also, there is no reason generally to log out of the app unless you are trying to access a different network.