Where is login info stored

Just curious, are login info in Google, Youtube, etc… stored in their own databases? Or do they have another way of storing the information?