Created EmailAccount class, which handles logins via IMAP. Also cleaned up some basic code.