logout functionality
with submodules