Handle login/game connections in separate threads, not tested for
concurrency yet (it's here just to make crashses temporary).
Add a missing import.