You need to Add the Wifi connection blocks to your code so that the Atom can connect to a wifi network.
When run from the website, the wifi is already activated by the UIFlow connection code.