Chat connection and UI manager added.

Logic and UI are split into two main scripts.