Dynamically set configuration on session expire doesn't work