Fixes Issue #203

This PR fixes issue #203 and improves the way licenses are activated. It adds more checks to make sure the result sent by the remote server is what we actually expect.