Allow restricting timeout functionality

This allows restricting the session timeout functionality to a specific group of users, ie. preventing some of the accounts to get logged out automatically. It lets you specify a MongoDB query that has to be matched for session timeout to work.