Uwsgi-luci - unable to login via LuCI if change rpcd password

I use nginx and uwsgi for LuCI and make remote RPC calls.

This is the default rpcd config:

config rpcd
        option socket /var/run/ubus.sock
        option timeout 30

config login
        option username 'root'
        option password '$p$root'
        list read '*'
        list write '*'

If I change the default password of rpcd, LuCI doesn't let me login and throw this error:

uwsgi-luci: luci: failed login on / for root from

Is the password hard-coded somewhere? How do I change the password? Or I need to add another config block for in /etc/config/rpcd for remote RPC calls?