Can you use something tried and tested over something custom?
It's common for people to suggest not inventing your own hashing algorithm because you'll likely make a mistake and open yourself up to security exploits - I'd go further and say don't write your own login system at all if you don't have to.
I mean logins, passwords, password recovery, sessions, user roles etc.
> I don't want to use third-party login services. Are there any pre-built self-hosted systems for this?
If there's a specific language or framework you're using (e.g. Django, Laravel), look for the standard battle tested solution that everyone else is using.
You're just asking for trouble implementing this yourself. I wouldn't discount a third party service either.
It's common for people to suggest not inventing your own hashing algorithm because you'll likely make a mistake and open yourself up to security exploits - I'd go further and say don't write your own login system at all if you don't have to.