Added wifi connection receiver

Fixed the way wifi connection was checked