Refactors verification process

Also makes this library compatible with ruby-macaroons.