Added code to get authorization code