Authentication We follow the steps in Angular 1.x sample . I will create some facilities. A Signin and Signup components. A AuthService to wrap HTTP authentiction service. A AppShowAuthed directive to show or hide UI element against the authentiction status. Lets start with creating AuthService . AuthService In order to handle signin and signup request, create a service named AuthService in src/app/core folder to process it. @ Injectable () export class AuthService { private currentUser$ : BehaviorSubject < User > = new BehaviorSubject < User >( null ); private authenticated$ : ReplaySubject < boolean > = new ReplaySubject < boolean >( 1 ); private desiredUrl : string = null ; constructor ( private api : ApiService , private jwt : JWT , private router : Router ) { } attempAuth( type : string , credentials : any ) { const path = ( type === ' signin ' ) ? ' /login ' ...