fixed auth bug
added published_bugs to the doc object for templates and default template now uses it