Add authentication encoding support for both new and old community versions

Add authentication encoding support for both new and old community versions.