title: Skype Web SDK Sign in not working
body: <p>I'm using the Skype SDK entry point source from <a href="https://msdn.microsoft.com/EN-US/library/dn962162(v=office.16).aspx" rel="nofollow">https://msdn.microsoft.com/EN-US/library/dn962162(v=office.16).aspx</a> and trying to sign into Skype but I keep hitting an issue with one of the Skype functions. I currently have 2 text fields both, which have its own ID values (#username and #password) and I have 2 buttons (#signin and #signout). </p>
  
  <pre><code>    &lt;script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'&gt;&lt;/script&gt;
  &lt;SCRIPT type='text/javascript' SRC='https://swx.cdn.skype.com/shared/v/1.1.23.0/SkypeBootstrap.min.js'&gt;&lt;/SCRIPT&gt;
      &lt;TABLE CLASS='test'&gt;
  &lt;TR&gt;&lt;TD ALIGN=RIGHT&gt;&lt;INPUT TYPE=TEXT class=suptabde NAME="username" ID="username" VALUE="" MAXLENGTH=40 style="width:18em"&gt;
  &lt;INPUT TYPE=PASSWORD class=testtabde NAME="password" VALUE="" MAXLENGTH=40 style="width:18em"&gt;
  &lt;BUTTON id='signin' class='testtabde' STYLE='text-align:center' VALUE='  Skype Login  '&gt;Log in&lt;/BUTTON&gt;&lt;BUTTON id='signout' class='suptabde' STYLE='text-align:center' VALUE='  Skype Login  '&gt;Log out&lt;/BUTTON&gt;
  &lt;/TABLE&gt;
  </code></pre>
  
  <p>I have taken a copy of the js content from the msdn website, which looks like the following,</p>
  
  <pre><code>$(function () {
      'use strict';    // create an instance of the Application object;
      // note, that different instances of Application may
      // represent different users
      var Application
      var client;
      Skype.initialize({
          apiKey: 'SWX-BUILD-SDK',
      }, function (api) {
          Application = api.application;
          client = new Application();
      }, function (err) {
          alert('some error occurred: ' + err);
      });
      // whenever state changes, display its value    
      client.signInManager.state.changed(function (state) {
          $('#application_state').text(state);
      });
      // when the user clicks on the "Sign In" button    
      $('#signin').click(function () {
      // start signing in
      client.signInManager.signIn({
          username: $('#username').text(),
          password: $('#password').text()
      }).then(
          //onSuccess callback
          function () {
              // when the sign in operation succeeds display the user name
              alert('Signed in as ' + client.personsAndGroupsManager.mePerson.displayName());
          }, 
          //onFailure callback
          function (error) {
              // if something goes wrong in either of the steps above,
              // display the error message
              alert(error || 'Cannot sign in');
          });
      });
  
  // when the user clicks on the "Sign Out" button
  $('#signout').click(function () {
      // start signing out
      client.signInManager.signOut()
          .then(
              //onSuccess callback
              function () {
                  // and report the success
                  alert('Signed out');
              }, 
          //onFailure callback
          function (error) {
              // or a failure
              alert(error || 'Cannot sign in');
          });
  });
  });
  </code></pre>
  
  <p>When loading up my html page the error I get following error,
  "Uncaught TypeError: Cannot read property 'signInManager' of undefined". The line it points at with the error is "client.signInManager.state.changed(function (state) {". I can see that 'signInManager' is in the SDK-build.js file, which is picked up by the source correctly from swx.cdn.skype.com/vs/SDK-build.js so I'm not sure how to get around this, has anyone got any ideas on how to resolve this issue?</p>