Actually, there is nothing wrong in taking a bath with soap whether this is done during the obligatory or optional ghusl (ritual bath) as long as you perform the obligations of ghusl while performing the obligatory ghusl which are: rinsing the mouth, and sniffing the nose and pouring water on the whole body. In fact, using soap while performing ghusl is a matter of cleanliness that is encouraged Islamically. So, there is nothing wrong to perform ghusl using soap.
Elaborating on the proper method of performing Ghusl, Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states:
“The proper method of ghusl (ritual bath) involves the following steps:
1. Make the niyyah (intention) to perform ghusl for purification.
2. Wash your private parts thoroughly with water.
3. Perform wudu’ (ablution) except for washing of your feet, which you can do later while bathing the body.
4. Wash the entire body, starting with your head and the right side, followed by the left.
5. It is preferred that the whole body be washed three times. The minimum is once.
having completed the above, you are considered eligible to perform the salah (prayer).”