Browser authentication logic for the WordPress.com REST API