logout on app paused
some improvements and bug fixes