added cleaner login/logout failure handling and processing