This issue is related to SM-Obstacle/Obstacle-API#36 on the API.
In summary, during the authentication procedure, when the pending request finishes, the script should check its status code. If it's 200, the authentication succeeded and the response body contains the new token of the player. If it's 307, the script must make the same request to the API, wrapped for the /staggered prefix route. Otherwise, the authentication failed.