In general, you're right. One of the roles of Congress is to pass legislation to regulate private citizens and the government. But it can't go so far as to take away presidential power completely. I don't think Congress could have passed a law during World War II banning the invasion of Normandy and insisting on an invasion of Italy instead. Those are legitimate decisions for the president as commander in chief. But the Congress can affect those decisions by choosing to build more landing craft. When it comes to the military treatment of prisoners, the president should be able to decide where the detention facility is going to be and how the prisoners are going to be treated. But if the Congress doesn't appropriate funds for Guantánamo Bay, then it doesn't matter what the president thinks.
Do you believe that the branches are equal?
Yes, but they have different functions and powers. In the case of the War of 1812, Congress was the more warlike branch. In that instance, President Madison should have used his presidential powers to try to check the populism of Congress, but he didn't do so. In the last few decades, we've had a period where the executive branch has been in the leadership position. It's not inevitable.