Small changes to fix the timed logout.