Update getTemplate. Use login headers for page requests.