login(user){
let headers = new Headers();
headers.append('Content-Type','application/json');
return this.http
.post(
'/API/login',
JSON.stringify(user),
{ headers }
)
.map(res => res.json())
.map((res) => {
if(res.success){
localStorage.setItem('auth_token', res.auth_token);
this.loggedIn = true;
return true;
}else{
return false;