Add a state parameter in the returnTo URL

Why ? We just check if err isn't null or undefined.