how to add a loading sign while redirecting?