Fix markup
Register presence and message handlers before getting the roster

Otherwise some presence notifications might be lost