This is not done yet, but it is a VERY good start. Added $Id$ tags to a lot of the files.
function there to check if the user is logged in without having to connect to the IMAP server. Using this function in compose.php as a test.