I searched everywhere but I couldn't get a way to create a login logout system, Most of it has how to create a login system UI but not the backend javascript, I want a login logout system like many websites do we can create an account.
There are a several ways to create a Auth system in web application.
One of the simple ones without a server is usage of Firebase.
You can find the docs here : https://firebase.google.com/
Or If you need a back-end to do all your needs there are another third-party applications such Auth0 and more
Hope you find this helpful.