title: Challenge does not handle challenge with adapter based authentication
body: <p>I have been trying to develop adapter-based authentication for an application, and I'm not quite sure why the challenge handler does not get triggered here. </p>
  
  <p><strong>Client-side main.js:</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var AuthenticationHandler = WL.Client.createChallengeHandler("EventAuthRealm");
  
  AuthenticationHandler.isCustomResponse = function(response) {
    if (!response || !response.responseJSON || response.responseText === null) {
      return false;
    }
    if (typeof(response.responseJSON.authStatus) !== 'undefined') {
      return true;
    } else {
      return false;
    }
  };
  
  AuthenticationHandler.handleChallenge = function(response) {
    var authRequired = response.responseJSON.authRequired;
  
    if (authRequired == false) {
  
      WL.logger.debug("done");
      busyIndicator.hide();
      AuthenticationHandler.submitSuccess();
      toEventList(); //function to navigate to next page
  
  
    } else if (authRequired == true) {
  
      WL.logger.debug("false");
      busyIndicator.hide();
      AuthenticationHandler.submitFailure();
      WL.Logger.debug(response.responseJSON.errorMessage);
    }
  };</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>Login function:</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function login() {
  
    var reg = $("#attendeeId").val();
    var userpw = $("#attendeePw").val();
  
    busyIndicator.show();
    var invocationData = {
      adapter: "eventdbAdapter",
      procedure: "submitAuthentication",
      parameters: [reg, userpw]
    };
  
    AuthenticationHandler.submitAdapterAuthentication(invocationData, {});
  
  };</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>HTML code of the login page:</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div data-role="page" id="eventloginpage"&gt;
    &lt;div data-role="header" align="center" data-theme="b"&gt;Event app&lt;/div&gt;
  
    &lt;div data-role="content" style="padding: 15px" id="wat"&gt;
      &lt;input type="text" name="attId" id="attendeeId" placeholder="Attendee ID"&gt;
      &lt;input type="password" name="password" id="attendeePw" placeholder="Attendee Password"&gt;
  
      &lt;!-- Buttons here --&gt;
      &lt;a href="#" data-role="button" id="loginButton" data-theme="b" onclick="login();"&gt;Login&lt;/a&gt;
      &lt;a href="#" data-role="button" id="button" onclick="logout();"&gt;Logout for now&lt;/a&gt;
    &lt;/div&gt;
  
    &lt;div data-role="footer" align="center"&gt;Text&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>If this might be related, I built the multipage component of the application following the tutorial that uses pagecontainer change. </p>
  
  <p><strong>Example:</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function toEventList() {
    $(':mobile-pagecontainer').pagecontainer('change', 'eventpage.html');
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Whenever I execute the login function, everything works as intended up until submitAdapterAuthentication is called.</p>
  
  <p>Google Dev console returns a timeout on the request. When executing the app on an Android device, Logcat displays a status code of 201. I can only assume that the object is created successfully with the information collected from the fields, however, the handler does not submit the credentials at all.</p>
  
  <p>Any kind of advice would be greatly appreciated. I apologise in advance if my post seems silly as I am not quite experienced with MobileFirst and Web technologies in general.</p>