Use basic-auth module for parsing

I thought you may like this since it simplified your code quite a bit. It's not necessary, though :)