First try at getting smart SM login/publish flow.