What you've done wrong, is not connected the switch as a switch, you've put all the lives together meaning both sides of the switch are live which ever position it's in.
You'll need to take it all apart again and test with a continuity tester for the switch line. You ought to have 4 connections, permanant live, neutral, switched live and earth. Sounds like you only have the 3 connections.