There are plenty of login examples in the community.
As you’ve already been advised, try studying a bit and testing something out, and if you run into any errors, update us and we’ll help you.
It’s much better to learn than to receive ready-made code, also because you’d later have trouble modifying and understanding it.