Fixed error in logout