Added the swap call for the authorization code