OAuth support, attachments and additional unit tests