adding in checks for browserid post functionality

Just realized that my new logic is failing in some untested cases. I've added tests here for that.