Obedience to Your Husband
Even if the husband is a faasiq and unjust, it remains waajib for the wife to obey him since Allah Ta’ala has appointed him the haakim (ruler). Hence, just as it is waajib for the people to obey the faasiq ruler, so too is it for the wife.
However, obedience is not permissible if the husband prevents the wife from Fardh Salaat, Saum, etc. But regarding Nafl Salaat and Saum, it remains waajib for the wife to obey him.
If the husband perpetrates explicit kufr, then the wife should acquire a fatwa from a Muhaqqiq Aalim and separate herself from him (since the nikah is invalidated by kufr).
Besides kufr, obedience to him remains incumbent notwithstanding his fisq (flagrant sinning), although it will not be permissible for the wife to obey him if he instructs her to commit fisq.
(Malfoothaat, Part 8)