Fixed issues regarding bad internet connection

-added detection of internet connection
-added alerts when no internet is detected
-no more crashes when internet is missing