added google auth
used optparse for nicer command line options
templates moved inside package.
not dependent on server working directory.