Fix login/logout process and testu and testi