complete event loop and ssh/telnet separation

works fine, only remaining is authentication.