P2: There is quite a bit of code here related to automated logout. If this is important why not use the established [Automated Logout module](drupal.org/project/autologout)?