Messages are not being saved in DB via AJAX