Fixing auth and html template issues