Made template script for Google OAuth2 flow more flexible