Fixes login/logout