add redirect in js