error in example code

@jiahuang found these issues in the wifi example code.
I think it's running properly now, but I still never get a connection.. should I expect to?