updated code for gmail credential init