Moving the redirect to a separate view