Made ajax post methods redirect browser on success, if the server says to