<html>
<head>
    <title>Spark Login Example</title>
</head>

<body>
<div id="spark-login"/>

<script src="../../dist/spark.js"></script>
<script>
    var token = 'YOUR_ACCESS_TOKEN_HERE';

    spark.on('login', function() {

        //Get all events
        spark.getEventStream(false, false, function(data) {
            console.log("Event: " + JSON.stringify(data));
        });

        //Get your devices events
        spark.getEventStream(false, 'mine', function(data) {
            console.log("Event: " + JSON.stringify(data));
        });

        //Get test event for specific core
        spark.getEventStream('test', 'CORE_ID', function(data) {
            console.log("Event: " + JSON.stringify(data));
        });
    });

    // Login as usual
    //spark.login({ username: 'email@example.com', password: 'password'});
    spark.login({ accessToken: token });

</script>
</body>
</html>

<html>
<head>
    <title>Spark Login Example</title>
</head>

<body>
<div id="spark-login"/>

<script src="http://cdn.jsdelivr.net/sparkjs/0.4.1/spark.min.js"></script>
<script>
    var token = 'YOUR_ACCESS_TOKEN_HERE';

    spark.on('login', function() {

        //Get all events
        spark.getEventStream(false, false, function(data) {
            console.log("Event: " + JSON.stringify(data));
        });

        //Get your devices events
        spark.getEventStream(false, 'mine', function(data) {
            console.log("Event: " + JSON.stringify(data));
        });

        //Get test event for specific core
        spark.getEventStream('test', 'CORE_ID', function(data) {
            console.log("Event: " + JSON.stringify(data));
        });
    });

    // Login as usual
    //spark.login({ username: 'email@example.com', password: 'password'});
    spark.login({ accessToken: token });

</script>
</body>
</html>

Update event demo to use jsdelivr.
Update event demo to use jsdelivr.
