Internet Connect apple script to connect to an aiport leap network.

I am trying to write a script to connect to our airport network. It is a leap network. This is what i have so far but can not get it to work.

tell application "System Events" to get name of current user
set iUser to result
set iNet to "Office Wireless"
display dialog "Enter Network Password" default answer "" with hidden answer
set ipass to the text returned of the result

tell application "Internet Connect"
	
	
	set network name to iNet
	set network type to LEAP
	set user name to iUser
       set password to ipass

	connect
	
	
	
end tell