check the location/anchor protocol/host
Merge pull request #40 from mastahyeti/better_origin_checking

Consider basic auth creds in isSameOrigin