fix on logout issues