added ajax for chat