Add userinfo API cmd; use it for template as well