Fixing bug on logout