Fix unicode error in authentication

When passing a unicode object as authSecret hmac.new fails, because it expects a byte type.