

function logoutUser()
{

	$.ajax({
		type: 'GET',
		url: IPPORT_SERVISE_URL,
		data: {
			cmd: 'xmlhttp',
			query: 'auth',
			sub: 'logout'
		},
		dataType: "json",

		success: function(data, textStatus, xhr) {

			if(location.pathname.match(/^\/(account\/(enter|new|activate|new-password|password-change))|cabinet|control/))
			{
				location.assign('/');
			}
			else
			{
				location.reload();
			}
		},

		error: function(xhr, textStatus, errorThrown) {

		}

	});

	return false;

}

