[#2] make the code more robust in logging into a GMA instance