Changes in logout code