Login system help

When I run this login system code in the unity editor or when I run this using the .exe file that I have created, I get an error saying that I am not connected to the internet but I am connected to the internet[47730-capture.jpg*|47730]. here is the script. Can anyone help me please, if you could that would be great

using UnityEngine;
using System.Collections;
using System.Text;
using System.Security;

public class LoginSystem : MonoBehaviour 
{
	public string GameName = "Your Game Name";
	public string secretKey="12345";  // Edit this value and make sure it's the same as the one stored on the server
	public string loginUrl="http://YourWebsite.com/.../login.php?";
	public string createAccountUrl="http://YourWebsite.com/.../createAccount.php?";
	public string checkUsernameUrl="http://YourWebsite.com/.../checkUsername.php?";
	public string checkEmailUrl="http://YourWebsite.com/.../checkEmail.php?";
	public string TermsURL="http://YourWebsite.com/.../Terms.html";
	public string forgotAccountUrl="http://YourWebsite.com/.../forgotAccount.php?";
	public string activateAccountUrl="http://YourWebsite.com/.../activateAccount.php?";
	public string deleteAccountURL="http://YourWebsite.com/.../deleteAccount.php?";
	public string testConnectURL="http://YourWebsite.com/.../testConnect.php";
	
	private string LoginName = "";
	private string LoginPassword = "";
	private string RegisterName = "";
	private string RegisterPassword = "";
	private string ConfirmRegisterPassword = "";
	private string RegisterEmail = "";
	private string ConfirmRegisterEmail = "";
	private string ForgotPasswordName = "";
	private string ForgotPasswordEmail = "";
	private string SecurityNumber = "";
	private string EmailSecurityNumber = "";
	private bool ToggleRememberMe = false;
	private string WindowTitel = "";
	
	private int RandomSecurityNumber = 0;
	private int RandomEmailSecurityNumber = 0;

	public GUISkin Skin;
	public float windowWidth = 350;
	private float windowHeight = 200;
	
	private Rect windowRect0 = new Rect(0,0,0,0);
	public string ChosenWindow = "Login";
	private string date = "/-/";

	public int MinNameLength = 3;
	public int MaxNameLength = 15;
	public int MinPasswordLength = 5;
	public int MaxPasswordLength = 15;
	public string SuccessfullyLoginLevel = "";
	public bool loginOnly;
	/* This start function
	*/
	void Start()
	{
		string TRMString = PlayerPrefs.GetString("RememberMe");
		if (TRMString == "True") 
		{
			ToggleRememberMe = true;
			LoginName = PlayerPrefs.GetString("RememberMeLoginName");
			LoginPassword = PlayerPrefs.GetString("RememberMeLoginPassword");
		}
		else 
		{
			ToggleRememberMe = false;
		}
	}
	
	void Update () 
	{
		if(ChosenWindow == "Register")
		{
			windowHeight = 300;
		}
		else if(ChosenWindow == "forgotPassword")
		{
			windowHeight = 150;
		}
		else 
		{
			windowHeight = 200;
		}
		
		windowRect0 = new Rect (Screen.width / 2 -(windowWidth / 2), Screen.height / 2 -(windowHeight / 2), windowWidth, windowHeight);
	}
	
	IEnumerator login(string name, string password)
	{
		WindowTitel = "Loading";
		date = "";
		string _name = name;
		string _password = password;
		
		string hash = Md5Sum(_name + secretKey).ToLower();
		
		WWWForm form = new WWWForm();
		form.AddField("name",_name);
		form.AddField("pass",_password);
		form.AddField("hash",hash);
		
		WWW www = new WWW(loginUrl,form);
		ChosenWindow = "wait";
		yield return www;
		date = www.text;
		Debug.Log(www.text);
		
		string resultsHash = Md5Sum(hash + "true").ToLower();

		if(date == resultsHash)
		{
			WindowTitel = "You have been successfully logged in.";
			ChosenWindow = "successfully";
		}
		else if(date == "activateFalse")
		{
			WindowTitel = "You have not activated your account.";
			ChosenWindow = "Login";
		}
		else if(date == "nameFalse")
		{
			WindowTitel = "You have specified an incorrect Username.";
			ChosenWindow = "Login";
		}
		else if(date == "passFalse")
		{
			WindowTitel = "You have specified an incorrect Password.";
			ChosenWindow = "Login";
		}
		else
		{
			ChosenWindow = "connectError";
		}
	}
	
	IEnumerator createAccount(string name,string password,string email)
	{	
		string _name = name;
		string _password = password;
		string _email = email;
		
		WWWForm form = new WWWForm();
		form.AddField("name",_name);
		
		WWW www = new WWW(checkUsernameUrl,form);
		WindowTitel = "Wait";
		yield return www;
		
		Debug.Log(www.text);
			
		
		if(www.text == "true")
		{
			WindowTitel = "The username you entered is already in use.";
		}
		else if(www.text == "false")
		{	
			string hash = Md5Sum(name + secretKey).ToLower();
		
			//////////////////////
			
			WWWForm formCheckEmail = new WWWForm();
			formCheckEmail.AddField("email",_email);
		
			WWW wwwCheckEmail = new WWW(checkEmailUrl,formCheckEmail);
			WindowTitel = "Wait";
			yield return wwwCheckEmail;
			Debug.Log(www.text);
		
			if(wwwCheckEmail.text == "true")
			{
				WindowTitel = "The email you entered is already in use.";
			}
			else if(wwwCheckEmail.text == "false")
			{
				WindowTitel = "";
				ChosenWindow = "wait";
	
				string _activationCode = Md5Sum(_name + Random.Range(1000000, 9999999).ToString());
				string _deleteCode = Md5Sum(_password + Random.Range(1000000, 9999999).ToString());
			
				WWWForm formCreateAccount = new WWWForm();
				formCreateAccount.AddField("name",_name);
				formCreateAccount.AddField("password",_password);
				formCreateAccount.AddField("email",_email);
				formCreateAccount.AddField("activationCode", _activationCode);
				formCreateAccount.AddField("deleteCode", _deleteCode);
				formCreateAccount.AddField("activationURL",activateAccountUrl);
				formCreateAccount.AddField("deleteAccountURL",deleteAccountURL);
				formCreateAccount.AddField("gameName",GameName);
				formCreateAccount.AddField("hash",hash);
	
				WWW wwwCreateAccount = new WWW(createAccountUrl,formCreateAccount);
				yield return wwwCreateAccount;
				Debug.Log(wwwCreateAccount.text);
			
				if(wwwCreateAccount.text == "true")
				{
					WindowTitel = "";
					ChosenWindow = "thank";
				}
				else if(wwwCreateAccount.text == "emailFalse")
				{
					WindowTitel = "Message delivery failed.";
					ChosenWindow = "Register";
				}
				else if(wwwCreateAccount.text == "secretKeyFalse")
				{
					WindowTitel = "Secret Key Error.";
					ChosenWindow = "Register";
				}
				else
				{
					ChosenWindow = "connectError";
				}
			}
			else
			{
			ChosenWindow = "connectError";
			}
		}
		else
		{
			ChosenWindow = "connectError";
		}
	}
	
	IEnumerator forgotAccount(string name,string email)
	{
		string _email = email;
		
		WWWForm form = new WWWForm();
		form.AddField("email",_email);
	
		ChosenWindow = "wait";
		WWW www = new WWW(forgotAccountUrl,form);
		yield return www;
		
		Debug.Log(www.text);
		
		if(www.text == "true")
		{
			WindowTitel = "Message successfully sent.";
			ChosenWindow = "successfullySent";
		}
		else if(www.text == "false")
		{
			WindowTitel = "Message delivery failed.";
			ChosenWindow = "forgotPassword";
		}	
		else if(www.text == "notFound")
		{	
			WindowTitel = "The e-mail could not be found.";
			ChosenWindow = "forgotPassword";
		}
		else
		{
			ChosenWindow = "connectError";
		}
	}
	
	IEnumerator TestConnectRegister() 
	{
		ChosenWindow = "wait";
		WWW www = new WWW(testConnectURL);
		yield return www;
		
		if(www.text == "true") 
		{
			RandomSecurityNumber = Random.Range(1000, 9999);;
			ChosenWindow = "Terms";
		}
		else
		{
			ChosenWindow = "connectError";
		}
	}
	
	IEnumerator TestConnectForgotAccount() 
	{
		ChosenWindow = "wait";
    	WWW www = new WWW(testConnectURL);
		yield return www;
		if(www.text == "true") 
		{
			RandomEmailSecurityNumber = Random.Range(1000, 9999);
			ChosenWindow = "forgotPassword";
		}
		else
		{
			ChosenWindow = "connectError";
		}
	}
	
	public string Md5Sum(string input)
	{
    	// step 1, calculate MD5 hash from input
    	System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create();
    	byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(input);
    	byte[] hash = md5.ComputeHash(inputBytes);
 
    	// step 2, convert byte array to hex string
    	StringBuilder sb = new StringBuilder();
    	for (int i = 0; i < hash.Length; i++)
    	{
    	    sb.Append(hash*.ToString("X2"));*
  • }*

  • return sb.ToString();*

  • }*

  • public bool VerifyEmailAddress(string address)*

  • {*
    string[] atCharacter;
    string[] dotCharacter;

  •  atCharacter = address.Split("@"[0]);*
    
  • if(atCharacter.Length == 2)*

  • {*

  •  	dotCharacter = atCharacter[1].Split("."[0]);*
    
  •  	if(dotCharacter.Length >= 2)*
    
  •  	{*
    
  •  		if(dotCharacter[dotCharacter.Length - 1].Length == 0)*
    
  •      {*
    
  •      	return false;*
    
  •      }*
    
  •    	else*
    
  •  		{*
    
  •  	return true;*
    
  •  }*
    
  •  }*
    
  •  else*
    
  •  	{*
    
  •  		return false;*
    
  •  }	*
    
  •  }*
    
  •  else*
    
  •  {*
    
  • return false;*

  • }*

  • }*

  • IEnumerator loadLevel()*

  • {*

  •  yield return new WaitForSeconds(0.5f);*
    
  •  Application.LoadLevel(SuccessfullyLoginLevel);*
    
  • }*

  • void OnGUI()*

  • {*

  •  GUI.skin = Skin;*
    
  •  windowRect0 = GUI.Window(0, windowRect0, DoMyWindow, WindowTitel);*
    
  • }*

  • void DoMyWindow(int windowID)*

  • {*

  •  GUI.skin = Skin;*
    
  •  if(ChosenWindow == "Login")*
    
  •  {*
    
  •  	GUI.Label(new Rect(15, 45, 140, 30), "Username:");*
    
  •  	LoginName = GUI.TextField(new Rect(130, 49, 200, 20), LoginName, 50);*
    
  •  	GUI.Label(new Rect(15, 80, 140, 30), "Password:");*
    

_ LoginPassword = GUI.PasswordField(new Rect(130, 84, 200, 20), LoginPassword, “*”[0], 50);_

  •  	if (GUI.Button(new Rect(20,127,100,25), "Login"))*
    
  •  	{*
    
  •  		PlayerPrefs.SetString("RememberMe",ToggleRememberMe.ToString());*
    
  •  		if(LoginName == "")*
    
  •  		{*
    
  •  			WindowTitel = "You cannot login without a name";*
    
  •  		}*
    
  •  		else if(LoginPassword == "")*
    
  •  		{*
    
  •  			WindowTitel = "You cannot login without a password";*
    
  •  		}*
    
  •  		else*
    
  •  		{*
    
  •  			StartCoroutine(login(LoginName,LoginPassword));*
    
  •  		}*
    
  •  	}*
    
  •  	ToggleRememberMe = GUI.Toggle(new Rect(130, 110, 140, 30), ToggleRememberMe, "Remember Me");*
    
  •  	if (ToggleRememberMe)* 
    
  •  	{*
    
  •  		PlayerPrefs.SetString("RememberMeLoginName",LoginName);*
    
  •  		PlayerPrefs.SetString("RememberMeLoginPassword",LoginPassword);*
    
  •  	}*
    
  •  	else* 
    
  •  	{*
    
  •  		PlayerPrefs.SetString("RememberMeLoginName","");*
    
  •  		PlayerPrefs.SetString("RememberMeLoginPassword","");*
    
  •  	}*
    
  •  	if (!loginOnly)*
    
  •  	{*
    
  •  		if (GUI.Button(new Rect(20,155,100,25), "Register"))*
    
  •  		{			*
    
  •  			WindowTitel = "";*
    
  •  			StartCoroutine("TestConnectRegister");*
    
  •  		}*
    
  •  		if (GUI.Button(new Rect(130,157,200,23), "I forgot my password/username"))*
    
  •  		{*
    
  •  			WindowTitel = "";*
    
  •  			StartCoroutine("TestConnectForgotAccount");*
    
  •  		}*
    
  •  	}*
    
  •  	else*
    
  •  	{*
    
  •  		if (GUI.Button(new Rect(20,157,200,23), "I forgot my password/username"))*
    
  •  		{*
    
  •  			WindowTitel = "";*
    
  •  			StartCoroutine("TestConnectForgotAccount");*
    
  •  		}*
    
  •  	}*
    
  •  }*
    
  •  else if(ChosenWindow == "Terms")*
    
  •  {*
    
  •  	if (GUI.Button(new Rect(windowWidth / 2 - 25,50,50,25), "Terms"))*
    
  •  	{*
    
  •  		Application.OpenURL (TermsURL);*
    
  •  	}*
    
  •  	if (GUI.Button(new Rect(windowWidth / 2 - 100,120,200,25),"I agree to these terms"))*
    
  •  	{*
    
  •  		ChosenWindow = "Register";*
    
  •  	}*
    
  •  	if (GUI.Button(new Rect(windowWidth / 2 - 100,150,200,25),"I do not agree to these terms"))*
    
  •  	{*
    
  •  		ChosenWindow = "Login";*
    
  •  	}			*
    
  •  }*
    
  •  else if (ChosenWindow == "Register")*
    
  •  {*
    
  •  	GUI.Label(new Rect (15, 35, 140, 30), "Username:");*
    
  •  	RegisterName = GUI.TextField(new Rect (130, 39, 200, 20), RegisterName, 25);*
    
  •  	GUI.Label(new Rect (15, 70, 140, 30), "Password:");*
    

_ RegisterPassword = GUI.PasswordField(new Rect(130, 74, 200, 20), RegisterPassword, “*”[0], 25);_

  •  	GUI.Label(new Rect (15, 95, 140, 30), "Confirm:");*
    

_ ConfirmRegisterPassword = GUI.PasswordField (new Rect (130, 99, 200, 20), ConfirmRegisterPassword, “*”[0], 25);_

  •  	GUI.Label(new Rect (15, 130, 140, 30), "E-mail:");*
    
  •  	RegisterEmail = GUI.TextField (new Rect (130, 134, 200, 20), RegisterEmail, 25);*
    
  •  	GUI.Label(new Rect (15, 155, 140, 30), "Confirm:");*
    
  •  	ConfirmRegisterEmail = GUI.TextField (new Rect (130, 159, 200, 20), ConfirmRegisterEmail, 25);*
    
  •  	GUI.Label(new Rect (15, 190, 400, 30), "Security Number:   " + RandomSecurityNumber);*
    
  •  	SecurityNumber = GUI.TextField(new Rect(130, 220, 200, 20), SecurityNumber, 50);*
    
  •  	if (GUI.Button(new Rect(15,260,60,25),"Back"))*
    
  •  	{*
    
  •  		WindowTitel = "";*
    
  •  		ChosenWindow = "Login";*
    
  •  	}*
    
  •  	if (GUI.Button(new Rect(windowWidth - 75,260,60,25),"Reset"))*
    
  •  	{*
    
  •  		RegisterName = "";*
    
  •  		RegisterPassword = "";*
    
  •  		ConfirmRegisterPassword = "";*
    
  •  		RegisterEmail = "";*
    
  •  		ConfirmRegisterEmail = "";*
    
  •  		SecurityNumber = "";*
    
  •  	}*
    
  •  	if (GUI.Button(new Rect(windowWidth / 2 - 40,250,80,30),"Submit"))*
    
  •  	{*
    
  •  		if(RegisterPassword != ConfirmRegisterPassword)*
    
  •  		{*
    
  •  			WindowTitel = "The passwords you entered do not match.";*
    
  •  			return;*
    
  •  		}*
    
  •  		if(RegisterEmail != ConfirmRegisterEmail)*
    
  •  		{*
    
  •  			WindowTitel = "The e-mail addresses you entered do not match.";*
    
  •  			return;*
    
  •  		}*
    
  •  		if(RegisterPassword == ConfirmRegisterPassword && RegisterEmail == ConfirmRegisterEmail)*
    
  •  		{*
    
  •  			if(RegisterName.Length < MinNameLength)*
    
  •  			{*
    
  •  				WindowTitel = "The username you entered is too short.";*
    
  •  				return;*
    
  •  			}*
    
  •  			else if(RegisterName.Length > MaxNameLength)*
    
  •  			{*
    
  •  				WindowTitel = "The username you entered is too long.";*
    
  •  				return;*
    
  •  			}*
    
  •  			if(RegisterPassword.Length < MinPasswordLength)*
    
  •  			{*
    
  •  				WindowTitel = "The password you entered is too short.";*
    
  •  				return;*
    
  •  			}*
    
  •  			else if(RegisterPassword.Length > MaxPasswordLength)*
    
  •  			{*
    
  •  				WindowTitel = "The password you entered is too long.";*
    
  •  				return;*
    
  •  			}*
    
  •  			if(VerifyEmailAddress(RegisterEmail) == false)*
    
  •  			{*
    
  •  				WindowTitel = "The e-mail address you entered is invalid.";*
    
  •  				return;*
    
  •  			}*
    
  •  			if(SecurityNumber != RandomSecurityNumber.ToString())*
    
  •  			{*
    
  •  				WindowTitel = "The security number you entered is invalid.";*
    
  •  				RandomSecurityNumber = Random.Range(1000, 9999);;*
    
  •  			}*
    
  •  			else*
    
  •  			{*
    
  •  				StartCoroutine(createAccount(RegisterName, RegisterPassword, RegisterEmail));*
    
  •  			}					*
    
  •  		}*
    
  •  	}*
    
  •  }*
    
  •  else if (ChosenWindow == "wait")*
    
  •  {*
    
  •  	GUI.Label(new Rect (windowWidth / 2 - 65, windowHeight / 2 - 10, 140, 30), "Please Wait.");*
    
  •  }*
    
  •  else if (ChosenWindow == "connectError")*
    
  •  {*
    
  •  	WindowTitel = "Error";*
    
  •  	GUI.Label(new Rect (windowWidth / 2 - 125, windowHeight / 2 - 40, 300, 80), "Please check your internet connection.");*
    
  •  	if (GUI.Button(new Rect(windowWidth / 2 - 40, windowHeight - 50,80,30),"Try again"))*
    
  •  	{*
    
  •  		WindowTitel = "";*
    
  •  		ChosenWindow = "Login";*
    
  •  	}*
    
  •  }*
    
  •  else if (ChosenWindow == "thank")*
    
  •  {*
    
  •  	GUI.Label(new Rect (windowWidth / 2 - 145, windowHeight / 2 - 70, 300, 120), "An email has been sent to " + RegisterEmail + " with instruction on how to activate this account.");*
    
  •  	if (GUI.Button(new Rect(windowWidth / 2 - 30,150,60,25),"Back"))*
    
  •  	{*
    
  •  		ChosenWindow = "Login";*
    
  •  		LoginName = RegisterName;*
    
  •  		LoginPassword = RegisterPassword;*
    
  •  		RegisterName = "";*
    
  •  		RegisterPassword = "";*
    
  •  		ConfirmRegisterPassword = "";*
    
  •  		RegisterEmail = "";*
    
  •  		ConfirmRegisterEmail = "";*
    
  •  		WindowTitel = "";*
    
  •  		SecurityNumber = "";*
    
  •  	}*
    
  •  }	*
    
  •  //544LM*
    
  •  else if (ChosenWindow == "successfully")*
    
  •  {*
    
  •  	GUI.Label(new Rect (windowWidth / 2 - 125, windowHeight / 2 - 40, 300, 80), "You have been successfully logged in.");*
    
  •  	StartCoroutine("loadLevel");*
    
  •  }*
    
  •  else if (ChosenWindow == "forgotPassword")*
    
  •  {*
    
  •  	GUI.Label (new Rect (15, 45, 140, 30), "E-mail:");*
    
  •  	ForgotPasswordEmail = GUI.TextField (new Rect (90, 49, 240, 20), ForgotPasswordEmail, 25);*
    
  •  	GUI.Label (new Rect (15, 70, 400, 30), "Security Number:   " + RandomEmailSecurityNumber);*
    
  •  	EmailSecurityNumber = GUI.TextField (new Rect (260, 73, 70, 20), EmailSecurityNumber, 25);*
    
  •  	if (GUI.Button(new Rect(windowWidth - 75,110,60,25),"Reset"))*
    
  •  	{*
    
  •  		ForgotPasswordName = "";*
    
  •  		ForgotPasswordEmail = "";*
    
  •  	}*
    
  •  	if (GUI.Button(new Rect(15,110,60,25),"Back"))*
    
  •  	{*
    
  •  		WindowTitel = "";*
    
  •  		ChosenWindow = "Login";*
    
  •  	}*
    
  •  	if (GUI.Button(new Rect(windowWidth / 2 - 55,100,110,30),"Send"))*
    
  •  	{*
    
  •  		if(EmailSecurityNumber != RandomEmailSecurityNumber.ToString())*
    
  •  		{*
    
  •  			RandomEmailSecurityNumber = Random.Range(1000, 9999);*
    
  •  			WindowTitel = "The security number you entered is invalid.";*
    
  •  			ChosenWindow = "forgotPassword";*
    
  •  		}*
    
  •  		else*
    
  •  		{*
    
  •  			StartCoroutine(forgotAccount(ForgotPasswordName,ForgotPasswordEmail));*
    
  •  		}*
    
  •  	}*
    
  •  }*
    
  •  else if (ChosenWindow == "successfullySent")*
    
  •  {*
    
  •  	GUI.Label (new Rect (windowWidth / 2 - 125, windowHeight / 2 - 40, 300, 80), "Message successfully sent.");*
    
  •  	if (GUI.Button(new Rect(windowWidth / 2 - 45,120,80,30),"Login"))*
    
  •  	{*
    
  •  		WindowTitel = "";*
    
  •  		ChosenWindow = "Login";*
    
  •  		ForgotPasswordName = "";*
    
  •  		ForgotPasswordEmail = "";*
    
  •  	}*
    
  •  }*
    
  • }*
    }

Looking at your code, part of the problem might be that you just have http://yourwebsite.com. Also, how are you obtaining the information?

If you’re trying to connect using Unity’s standard networking SDK, you have to call Network.Connect to initialize the connection. Without initializing the connection by using Network.Connect, the code will not be able to start any connection to the server and return with no connection because you didn’t start one.

Take a look at Unity’s Networking guide for more information.
http://docs.unity3d.com/Manual/net-UnityNetworkElements.html

You might also want to try using Photon’s networking API, it’s a lot safer in my experience and you’ll have an easier time integrating that with your app. Multiplayer Game Development Made Easy

 public string GameName = "Your Game Name";
public string secretKey="12345"; // Edit this value and make sure it's the same as the one stored on the server
public string loginUrl="http://YourWebsite.com/.../login.php?";
public string createAccountUrl="http://YourWebsite.com/.../createAccount.php?";
public string checkUsernameUrl="http://YourWebsite.com/.../checkUsername.php?";
public string checkEmailUrl="http://YourWebsite.com/.../checkEmail.php?";
public string TermsURL="http://YourWebsite.com/.../Terms.html";
public string forgotAccountUrl="http://YourWebsite.com/.../forgotAccount.php?";
public string activateAccountUrl="http://YourWebsite.com/.../activateAccount.php?";
public string deleteAccountURL="http://YourWebsite.com/.../deleteAccount.php?";
public string testConnectURL="http://YourWebsite.com/.../testConnect.php";