Selecting the grant type based on the button clicked