Depends on how you authenticate users.
If you use AAA use your ACS (access control server) configuration and you can have anyway you want.
If you use local authentication you are restricted to a simpler option:
establish an absolute timeout on the access lines (in line config mode).
Please note that if you do not have access to your ACS config the absolute-timeout will still work even if you use tacacs/radius for authentication.