you can try this tutorial on medium : here.
I will advice that you used some secure hash algorithms (sha256,md5 ...) for the passwords you store and access to on your database. If you are planning to build a wide project you could consider using Sequelize as Hugo said but if it's just a little login page, go for a simple light project.
Just popping by to say that sha and md5 are not secure hashing algorithms for passwords. Check out bcrypt or PBKDF2 instead.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.