prevent page refresh on chat submit