I tried again your code (ok, I changed the SSID and Password)
Using Firefox and the serial monitor of Arduino IDE.
--> Only one "on" or "off"
Same with HTerm.
Same with Smartphone-Browser.
Maybe your ESP is faulty?
In your dropbox-picture, there I can see, that you are using a Arduino.....ATMega328-Board. (lower line of Arduino IDE)
How does this match? There should be a generic ESP8266 Module???
ESP8266 Arduino add-on
Arduino IDE 1.6.5