Virtual latching relay

Is your button connected using a resistor? The tutorial here explains about pull-up and pull down resistors: http://www.arduino.cc/en/Tutorial/Button

You can also use internal pull-up resistors; this tutorial explains more about digital pins and how to enable the internal pull-up resistors: http://www.arduino.cc/en/Tutorial/DigitalPins