Fix for aSync tasks, added safe logout system with configurations, minor
code cleanup.