Made redirect auth code work with iOS 6.