you can use localStorage or cookies to do this.
1. when login store use token into your localStorage or cookie.
2. check the token exist or not when every time user want to visit authenticated pages.
3. when user logout then expire or clear the localStorage or cookies token item