流不在$ .ajax内部

When i click on login button. Below function will be called. Execution flow is going till $.ajax but its not going inside $.ajax. Can anyone please help me on this.

$('#login').click(function() {

    var contextroot = "/services/";

    var userName = $('#userName').val();
    var password = $('#password').val();
    alert("insid ::: ");    
    $.ajax({
        url: contextroot+"login",
        dataType: 'json',
        type: 'GET',
        contentType: 'application/json',
        data: {
            userName:userName,
            password:password
        },

        success: function(data){
            sessionStorage.setItem("userName", "sharana");
            window.location.href = '/admin/index.html';
            return false;
        }
    });



});

Make available entire contextRoot in single variable as below

$('#login').click(function() {

  var contextroot = '/services/login';

  var userName = $('#userName').val();
  var password = $('#password').val();
  alert("insid ::: ");    
  $.ajax({
    url: contextroot,
    dataType: 'json',
  ....
  ...