Second Commit

Fixed some bugs, added client multithreading for the chat