Fixing cannot login again after logout