Fixing bug with new messages in email, in the process, changed logout methodology, and made log file not use python logging mechanism