Login data should never be encoded. The right cryptography uses cryptographic cache functions. They belong to cryptography, but have nothing to do with encoding and decoding. The result returned by a cryptographic function cannot be “decoded” in principle, the purpose of this function is totally different.
You don't need to store passwords at all, not even encrypted. Usually, stored is the password cache, the result returned by an cryptographic cache function. When the user enters a password, the cache is compared with the cache. Storing encrypted passwords is a big security bug.
Further information:
https://en.wikipedia.org/wiki/Cryptographic_hash_function
https://developer.mozilla.org/en-US/docs/Web/API/Crypto
https://developer.mozilla.org/en-US/docs/Web/API/Crypto/subtle
https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto