Certainly, but it would require some sort of control over the webserver (apache/etc), or some scripting/authentication framework (js/jquery + ajax, php, ruby, etc). It doesn't have to be too complicated, but it can become that way. The amount of security you need will dictate some of the decisions you make here.
Or... if you're going for low hanging fruit, you know, Wix, WordPress, Weebly, etc.
Learning to do modern web security yourself is rewarding. There are great standards around today such as OAuth and OpenID Connect. Lots of APIs to choose from.
Just use a free CMS. Wordpress etc as said above. Plug in what you need. You’ll spend less time setting that up than rolling your own. And it will be much easier to maintain and more secure.