Change webui factory from success to then promise