Basic auth and app structure