@webcity
You can add these codes ie to theme functions.php.
On login, there is hook after_login
osc_add_hook('after_login', function() {
setcookie('user_logged', 1, time() + (86400 * 30 * 12), "/");
});
So you can identify if user is logged using cookie user_logged
On logout, there is hook logout
osc_add_hook('logout', function() {
unset($_COOKIE['user_logged']);
setcookie('user_logged', '', -1, '/');
});