added server endpoint for chat