Are you are connecting to the correct SSID? It sounds like you're trying to connect to a wireless network that is using some form of EAP possibly with 802.1x auth on it if it's asking you for a username and password, unless you mean it opens a web browser automatically and asks for a username and password. In which case you should contact your schools IT.