Problem in Login in another instance using javascript/angular js

Dear All,

There is problem in login in another instance using javascript/angular js

I use the below code for that but it return null even another instance is running for which i try.

var header = {
“Accept”: “application/json”,
“Access-Control-Allow-Credentials” : true,
“Content-Type” : “text/plain charset=UTF-8”,
“Authorization”: "Basic " + btoa( uname + ‘:’ + pword ),
“Access-Control-Allow-Origin” : “*”,
“Access-Control-Allow-Methods” : “GET, POST, DELETE, PUT, OPTIONS,JSONP”,
“Access-Control-Allow-Headers” :“DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type”
};

    $http({ method : 'POST', url : url, headers: header })
        .success( function( data )
        {
            console.log( [ins.name](http://ins.name) +" login success" );
           
        })
        .error( function( data)
        {
            console.log( [ins.name](http://ins.name) +" login failed" );
          
        });
···

Thanks and Regards

Mithilesh Kumar Thakur