added in ajax friendly return if the success or failure redirect is
undefined.