move message sent alert to ajax javascript and remove it from controller