Adds redirect functionality