Improved credential handling for GS