added ajax request to get json messages from server