added autodetect and connect to IMRelay