I was thinking the same, but then you can still see the password as it will be sent to the encrypt with another api (the server action).
I don't think its possible to hide the password when you send it to the backend for authentication unless you encrypt it in javascript / client side. But then you still need to know how to decrypt it serverside.