Logout now checks for network