Make so that the ending '.apps.googleusercontent.com' is optional in the clientid.
Believe it or not but I just troubleshot this kind of problem for an hour or so.
PR also contains some fairly minor convention unification - few spaces.
No need for setting the class with js
Make short client id optional
... and sorry for the troubleshooting