Some modification: check for net connection when starting, handle the
situation when first start application without network connection, theme
styling.