Socket based chat written in Java