Testing the connection to the AP