You could use the phone to set the username and password that the Raspberry Pi should use to communicate with the internet. Here we make the assumption that you have WiFi in your class, in your school, in your home and that you are connecting to the internet with a WiFi router.