overloaded redirect

making sure data persists through redirects, optionally ignore redirect
in ajax request