new mailing system, and fixed up login/logout issues