Added the redirect_uri paramether when requesting a new token using code...

I think the redirect_uri is missing from the token request (see RFC 6749, 4.1.3)