Interacting $ud$ and $uds$ quark matter at finite densities and quark stars