General scaffolding and authentication