implemented an automatic forward when ajax succeeds