Refactor _decode_double_member_authentication to remove the signature
reordering for loop and some duplicate code.