Hi Chrisel,
I believe this resources for creating a custom login page can help you achieve what you want:
If you want to achieve something more in-depth for authenticating a user, you can look into Java Actions and the Core API documentation.
I hope those resources can help you achieve what you want, best regards!