1jQuery(window).load(function() {
2 //Set the login session
3 sessionStorage.setItem('status','loggedIn')
4});
5
6//Check the login session
7if (sessionStorage.getItem('status') != null))
8 //redirect to page
9 console.log('You are logged in');
10}
11else{
12 //show validation message
13 console.log('You are not logged in');
14}