look at redirecting and understand how to do this in js