add logging to the automatic logout method