if you are facing problem with drupal 7 logout and you want to logout visitor within a specific time. if you want to end you session in 1 or 2 day(s) or any other random time then the solution is to set 2o minutes for session timeout.
Change Session Timeout in Drupal 7 is easy. Default Drupal 7 session timeout is 23days which is defined in settings.php file which is located under default folder, after opening settings.php search for
Now you can change “2000000” which is equal to 23 days in seconds. and you can enter what ever you want like for 1 minute you can change 60.
I think this will clear you everything still you found any issue you can comment and ask for help.