<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>ViewPut.io - Put.io video viewer</title>
  </head>
  <body>
    <hello-world></hello-world>
    <button type="button" name="button" onclick="myFunction()">Authenticate me!</button>

    <script type="text/javascript">
      var riot = require('riot');
      var ipc = require('ipc');

      // User wishes to authenticate our application
      function myFunction() {
        // Use IPC to send a message on a specific channel from Render process to the Main process
        // The message is of little use as this moment, channel name is of utmost important.
        ipc.send('auth-request', "Request Authentication");
      }

      // Listen to the auth-result channel for asynchronous messages from the Main process
      ipc.on('auth-result', function (arg) {
        console.log(arg);
        // Change page HTML according to the status
        if (arg.startsWith('Success')) {
          document.write("Successfully Authenticated, thanks bruh!" + "\n" + arg);
        } else {
          document.write("Something went totally wrong, let's not talk for a while :-(");
        }
      });
    </script>

    <!-- Import our first test tag element and mount it to the DOM with the
         name parameter as required by our custom component             -->
    <script type="text/javascript" src="./build/js/riot-components/test.tag.js"></script>
    <script>riot.mount('hello-world', {name: "Bhargav R. Patel"})</script>
  </body>
</html>

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>ViewPut.io - Put.io video viewer</title>
  </head>
  <body>
    <hello-world></hello-world>
    <button type="button" name="button" onclick="myFunction()">Authenticate me!</button>

    <script type="text/javascript">
      var riot = require('riot');
      var ipc = require('ipc');

      // User wishes to authenticate our application
      function myFunction() {
        // Use IPC to send a message on a specific channel from Render process to the Main process
        // The message is of little use as this moment, channel name is of utmost important.
        ipc.send('auth-request', "Request Authentication");
      }

      // Listen to the auth-result channel for asynchronous messages from the Main process
      ipc.on('auth-result', function (arg) {
        console.log(arg);
        document.write("Welcome, " + arg.username + "!")
      });
    </script>

    <!-- Import our first test tag element and mount it to the DOM with the
         name parameter as required by our custom component             -->
    <script type="text/javascript" src="./build/js/riot-components/test.tag.js"></script>
    <script>riot.mount('hello-world', {name: "Bhargav R. Patel"})</script>
  </body>
</html>

Change formatting of welcome message upon auth success
Change formatting of welcome message upon auth success
