Added client userprefs
Fixed socket connection to client