Change the redirect based on where it came from