Making authentication algorithms pluggable