Added redirect functionality to the router class