ICYI, I wrote a blog post on how to add a login page to a Hugo site that’s hosted on Bitbucket / Aerobatic. It uses Aerobatic’s HTTP basic-auth plugin. You can add the built-in browser dialog version for free, or the pretty login page option with paid plans.
Cheers,
Jason
(disclaimer - I’m a co-founder of Aerobatic)