Frosting kept melting when trying to frost cake
There are two things I would consider with the frosting. The first is that either the cake or the kitchen was too warm when you tried to frost the cake. It's happened to me a few times that I set the indoors temperature too warm in the winter and frosting keeps melting for me. Freezing the cake for about 20 minutes before attempting to frost it will usually make it easier to do a nice job too.

Otherwise, when you make a frosting recipe like that one, you want to mix all the ingredients except the liquid (in this case milk) together first, and the add the liquid, a little at a time until the frosting is the right consistency. Never add all the liquid at once. I don't think the butter was the problem, if anything you didn't have enough of it compared to the amount of milk.