Hacky javascript redirect