Do login/logout before waiting