code cleanup for review by vlad - logout