[services/federation] encode username/password