Fixed obtainAccessToken method to take redirect URI