Problem with gsm remote control sketch

I'm not familiar with the GSM library and after a cursory glance I don't have the time to dissect it right now!

However, I would suggest removing the PIN number from the SIM card. Why add a degree of complication before it works?