You can set WordPress to automatically logout the idle users after a given interval of time. WP Idle Logout is the new WordPress plugin that one can use for increasing WordPress site security by automatically logging out users with a custom message and redirect to login screen.
Simply install and activate WP Idle Logout plugin, upon activation visit your admin area Dashboard -> Settings -> Idle Logout page and set the idle time (in seconds) and message to show on logout, save your settings and you are done.