What actually happens when you click login?

A detailed look at how password authentication work behind the scenes