The link you posted doesn’t contain any login code. They do reference another tutorial for managing users though, which again references yet another tutorial that handles login.
All of the tutorials are garbage, please do not use them for anything that will be published on the internet. They don’t adhere to modern standards (talking 10+ year old standards here) with protecting against sql injection, xss, etc.
I’m a firm believer that security is hard, so it’s one of the last things you should reinvent yourself. There are lots of debate here and elsewhere on using frameworks with purists saying it’s much better to learn all the fundamentals yourself. But if you want a site/app out there and don’t want to spend years learning to code / web security / sysadmin stuff then relying on someone else from time to time seems like a great idea in my mind. Frameworks like Laravel fixes all this for you and is vetted by a lot of people who really know what they are doing. Security is HARD, the only easy thing about it is messing up…
If you want to just make something yourself then there are other tutorials on user login out there. I don’t completely agree with this one either but at least it’s better.