// Generated by CoffeeScript 1.12.8
(function() {
  $(document).ready(function() {
    return $.ajax((window.location.href.match(/\/upgradesession/) ? window.location.href : portal) + '?kerberos=1', {
      dataType: 'json',
      statusCode: {
        401: function() {
          return $('#lform').submit();
        }
      },
      success: function(data) {
        if (window.location.href.match(/\/upgradesession/)) {
          return document.location = portal;
        } else {
          return $('#lform').submit();
        }
      },
      error: function() {
        return $('#lform').submit();
      }
    });
  });

}).call(this);
