How to Use the Management API in a Single-Page Application (SPA)