To logout from another shell:
logout Not login shell. exit logout
The user tries to logout from a shell that is not a login shell. They exit from this shell and are then able to logout.