Update code to support authorization code grant type