Basic login doesn't work with platform

I am using Ionic Platform’s Auth service to register and login user. Signup works fine but while logging in, it doesn’t call the success function neither the error function. The console, however, shows the message ''Ionic User: loaded user".

Ionic.Auth.login('basic', {'remember': true}, details).then(
            console.log("logged in");
	}, function(error){
	    vm.showAlert('Invalid username or password.');