-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
When the user submits the login form, you send an API request with their user/password. Your API handles it however you wish, and on success returns a user token. Using cookies (I've found the nookies library helpful for dealing with cookies), save that token locally, and then send that token along with every API request.
Next.js used to have a with-cookie-auth example which helped dealing with this, but it seems that they've removed it. One thing that I remember that it had, was a authentication function in the getInitialProps in protected (account) pages that would check for the token, and redirect the user to /login if it did not exist.