Well from what I remember from XAMPP you define a username and password on installation.
Theres numerous tutorials for login scripts out there. For example
this one. There are other options if you want a more robust login system (if your willing to pay a few quid) this
pre-built login system might be worth a look.
Did you try using the username 'root' with no password?