Make short clientid optional

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.