bug fix
change position of ridChange event trigger
- fix connection problem with ejabberd
- fix presence handling