added broadcastreceiver which changes the preferred network type once the device is connected to wifi