Use redirect instead of duplicated rendering code.