prevent session start when it is not needed.