1. fixed login issues (you'll get redirected to mail / welcome automatically)
2. listMail work fine now (utc time not displayed)
3. rearranged all client code in a separate file