After I replaced master mdf/ldf files, can no longer log in
Login details are stored in master, so it makes sense that they would be gone if you've replaced the master database files. 

The files in the template data folder are referred to in User Instances for Non-Administrators as "clean system database". I don't have an Express edition to hand to check but I would assume that if your now using a "clean" master database, the only login that would be present is "sa" with a blank password.