Connectivity check added, when app enters foreground