added redirect helper and modified controller