Remember that those registers are bytes, with 8 bits associated with 8 physical pins. When you set P1REN to 0, you turned off the internal resistors for all 8 of those pins. That means any of those 8 pins set for input are floating (likely producing random values) if they aren't connected to anything. That probably includes your button switch if it doesn't have an external pullup/down.
That also means "if (P1IN == 0)" is actually saying "if ANY of the input pins on P1 are non-zero, return false". I suspect that's not what you wanted.
Similarly setting P1OUT = 0 is turning off all outputs on P1. (And would affect resistor usage on inputs, if resisters were enabled.) Since you only have one pin set for output, you sorta get away with this one right now, but it'll get you in trouble later.