title: Argument of type 'User' is not assignable to parameter of type 'string'
body: <p>authentication.service.ts</p>
  
  <pre><code>import {Injectable} from '@angular/core';
  import {Router} from '@angular/router';
  
  export class User {
  constructor(
    public email: string,
    public password: string
  
   ) { }
   }
  
  var users = [
   new User('admin@admin.com','adm9'),
   new User('user1@gmail.com','a23')
  ];
  @Injectable()
  export class AuthenticationService {
   constructor(
    private _router: Router){}
   logout() {
    localStorage.removeItem("user");
    this._router.navigate(['Login']);
  }
  login(user){
   var authenticatedUser = users.find(u =&gt; u.email === user.email);
    if (authenticatedUser){
     localStorage.setItem("user", authenticatedUser);
     this._router.navigate(['Home']);      
     return true;
   }
   return false;
  }
   checkCredentials( ){
   if (localStorage.getItem("user") === null){
      this._router.navigate(['Login']);
    }
   } 
  }
  </code></pre>
  
  <p>Error</p>
  
  <blockquote>
    <p>[at-loader] src\app\authentication\authentication.service.ts:32:36 
        Argument of type 'User' is not assignable to parameter of type 'string'.</p>
  </blockquote>