added checking internet connection and location service

Quit application if internet and location service are not available