Added the state parameter to the redirect url when present in the request