API improvements

Add cmd_userinfo and fix cmd_show.