You should specify the protocol scheme (http, https, ...) in the URL:
http
https
$http.post('http://localhost:7001/testApp/user/login', { username: username, password: password }) .success(function (response) { callback(response);});