The most important thing is to keep your soap dry. After every use, make sure to place your soap in a place that drains well. If it is left in any amount of water, it will absorb it and become soft and slimy. If this does happen it is still perfectly usable, but it will disappear much quicker. I recommend not leaving your soap in the shower, but placing it on a slatted soap dish on the counter.
For soap that is not in use, it is best to store them in a cool dry place out on direct sunlight. If your soap contains essential oils, some are extra sensitive to sunlight and will begin to degrade. Not to mention, the sunlight will fade any pretty colors or designs in the soap. And, just like in the shower, unused soap can absorb moisture and soften. So, make sure to keep it dry. This means the bathroom - with the frequent steam and moisture - is not the best place. A linen closet or dresser is a good place. If the soap is scented, it will helped keep your things smelling fresh too.
Lastly, make sure you purchase good quality soaps. Different oils have different properties when used in soap making. Some make a harder bar, but can be drying to the skin. Others create softer soap, but are very moisturizing. This is why you often hear people complain that handmade soap doesn't last as long. But, a good soap recipe will contain a balance of both types of oils to result in a bar that will last a nice long time and be nourishing to your skin. You can do some research on the different soaping base oils. Many soapmakers will take custom orders and create a soap using just the oils you want.
Follow these tips and your handmade soap should last just as long as store bought. But, your skin will be much happier!