fix api logout