now check for internet connection before asking login