fix client credentials handler