How do I use the Management API in my single page application?