OpenLayers WFS featureselected event and featureunselected

HTML

<script src="http://cdnjs.cloudflare.com/ajax/libs/openlayers/2.11/OpenLayers.js"></script>
<body onload="init()">
     <h1>OpenLayers WFS with selectControl and eventListeners
    <div id="map"></div>
</body>

CSS

#map {
    width: 400px;
    height: 600px;
}

JavaScript

var map;
var layer, wms, selectControl;

var editableLayer = new OpenLayers.Layer.Vector("User Layer");
editableLayer.setZIndex(4000);

function init() {
    map = new OpenLayers.Map('map',
                             {
                                 layers: editableLayer
                             });
    wms = new OpenLayers.Layer.WMS(
        "OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0", {
        layers: 'basic'
    });

    layer = new OpenLayers.Layer.Vector("WFS", {

        strategies: [new OpenLayers.Strategy.BBOX()],
        protocol: new OpenLayers.Protocol.WFS({
            url: "http://geospatial.ga:8080/geoserver/newdata/ows",
            featureType: "newdata",
            featureNS: "http://openstreemap.org"
        }),

        eventListeners: {
            'featureselected': function (evt) {

                var feature = evt.feature;
                console.log(evt);
                alert(feature.attributes.NAME);

            }


            ,
                'featureunselected': function (evt) {
                console.log("feature not selected");
            }
        }
    });

    map.addLayers([wms, layer]);
    //layer.getFeaturesByAttribute('NAME','Albury');

    map.setCenter(new OpenLayers.LonLat(146.7, -41.8), 6);

    selectControl = new OpenLayers.Control.SelectFeature(layer, {});

    map.addControl(selectControl);
    selectControl.activate();



}