After starting the automatic mode, I cant switch it off.

Once you enter automatic mode, the delay() functions make the program not responsive to further button presses.

You will need to recraft the program to use non blocking techniques using millis() timers as shown in "blink without delay" or the tutorials on using millis() timers.

http://forum.arduino.cc/index.php?topic=223286.0

http://forum.arduino.cc/index.php?topic=503368.0

Are you using pullups or pulldowns on the button input switches. INPUT_PULLUP using the internal pullups is a good choice.