add message mode, and make work with oauth