Added support for encrypted wallets