You have three options:
1. browser auto logoff on exit
By removing your browsing history as soon as you close the browser, this makes sure that no one sees or uses your history if you are sharing the same computer, you have to search inetcpl.cpl
in run menu - WINKEY + R - there you will get Internet properties menu there you have to select Delete browsing history on Exit and then OK
2. cookie auto logoff by blocking
You can block most cookies while still allowing them from certain sites. With this exceptions, you can auto log out from Gmail or other webmails.
on your computer, open Google Chrome
in the top right, click the Menu
click Settings and then Show advanced settings
in the "Privacy" section, click Content settings
under "Cookies," click Manage exceptions
enter the site name you want to allow cookies for. to allow cookies from an entire domain, insert [*.]
before the domain name. for example: [*.]google.com
- this creates an exception for:
mail.google.com
drive.google.com
calendar.google.com
you can also put an IP address or a web address that doesn't begin with http
/ https
use the menu to choose whether the site can set cookies. If you select Clear on exit, its cookies are deleted every time you close your browser and your mail session will end too
3. auto logoff extension
Auto Logout extension automatically logs you out of all logged in accounts upon closure of all browser windows in case you forget to sign out. This extension is recommended for use in shared computers to keep different accounts safe. You just need to add the extension. What this extension does is, it simply logs out from websites once you close Google Chrome. That means you have to log in every time you open up your Chrome browser
https://chrome.google.com/webstore/detail/