added support for the "redirect after submit" pattern