Extract auth-signature from subscription module

Better and simpler tests now.
Merge branch 'refactor-auth-signature'