modified server for ChatApp