Add redirect function to Controller