Strings arent saving value

This is going to be kind of hard one to answer because it requires searching through this script so i appoligize in advance. but im having an issue. i have two variables that are going null after there entered into GUI.TextFeild for some reason

public string userNameText;
public string passwordText;

they seem to be storing user input as player enters name and password but once it gets to the OnMouseUP() the value becomes null. i cant figure out whats up. If anyone can figure out why please let me know. thank you.

Line 58 and line 60 are where they are declared i guess.

using UnityEngine;
//using UnityEditor;
using System.Collections;
using System;
using System.IO;
using System.Text;

public class LoginScreen : MonoBehaviour {
public string username;
public string password;
public string userNameText;
public string passwordText;
public string myStyle = "";
public bool isQuit = false;
public bool isLogin = false;
public bool isTryAgain = false;
public bool createNewAccount = false;
static string fileNameCheck = "Users.dat"; 
static string dir = Application.dataPath + "/Data/"; 
static string path = dir + fileNameCheck; 
public string userNameCheck;
static string line = "";
static string passline="";
private Vector3 newPosition;
public Transform target;
public AudioClip mouseClick;
public AudioClip mouseHover;
public Camera Camera1;
public Camera Camera2;
private GameObject cameraSwitcher;
static bool guiVisible = true;
float TextFieldx = 520f;



	void Start(){
		cameraSwitcher = GameObject.Find ("CameraSwitcher");
		cameraSwitcher.SendMessage("ChangeCamera");
	}
	
	void Update(){


	}

		public void OnGUI(){
		//GUIStyle myStyle = new GUIStyle ();
		//Debug.Log ("Username: " + userNameText);
		//GUI.color = Color.yellow;
		GUI.backgroundColor = Color.white;	
		GUI.skin.textField.fontSize = 35;
		GUI.skin.font = (Font)Resources.Load("Fonts/MagicMedieval", typeof(Font));


		if(guiVisible == true)
		{
		GUI.contentColor = Color.green;
		userNameText = GUI.TextField(new Rect(TextFieldx, 515, 545, 45), userNameText, 25);
		GUI.contentColor = Color.gray;
		passwordText = GUI.TextField(new Rect(TextFieldx, 635, 545, 45), passwordText, 25);
		}

	}


	
	void OnMouseEnter(){
		//change text color
		renderer.material.color=Color.yellow;
		audio.PlayOneShot(mouseHover);
	}
	
	void OnMouseExit(){
		//change text color
		renderer.material.color=Color.white;
	}
	
		void OnMouseUp(){
		//is this quit
		if (isQuit==true) {
			//quit the game
			Application.Quit();
		}
		if (isTryAgain == true) {
			UnityEngine.Debug.Log ("Try Again");
			cameraSwitcher.SendMessage("ChangeCamera");
			//userNameText = "";
			//passwordText = "";
			guiVisible = true;
		}
		if (createNewAccount == true) {
			this.CreateUser();
		}
		if (isLogin == true) {
			audio.PlayOneShot(mouseClick);
			Debug.Log (" Is Login Username: " + userNameText);
			Debug.Log (" Is Login Password: " + passwordText);
			this.CheckforFile();
		}
		else {
			Debug.Log("Clicked on Nothing");

		}
	}

	public void CheckforFile()
	{
		Debug.Log (" Check For File Username: " + userNameText);
		if (Directory.Exists(dir)) //check for dir first
		{
			Console.WriteLine("That path exists already.");			
		}
		else
		{
			// Try to create the directory.
			DirectoryInfo di = Directory.CreateDirectory(dir);
		}
		if (!File.Exists (path)) 
		{   // If file does not exist then create one
			// Create a file to write to. 
			string createText = "User File." + Environment.NewLine;
			
			File.WriteAllText (path, createText);
			this.CheckForUser();

		}
		else
		{
			this.CheckForUser();
		}
		
	}

	void CheckForUser()
	{
		Debug.Log ("Checkforuser Username: " + userNameText);
		foreach(string line in File.ReadAllLines(path))
		{
			//UnityEngine.Debug.Log("Line in File: " + line.Trim());
			UnityEngine.Debug.Log("Entered Username: " + userNameText);
			if(line.Trim() == userNameText) {
				this.FoundUser();

			}
		}
		//didnt find user
		this.UserNotFound();
	}

		
		
	void FoundUser()
	{
		UnityEngine.Debug.Log ("Found User");
		//username = userNameText;
		//now have to check if password is correct
		foreach(string passline in File.ReadAllLines(path))
		{
			if(passline.Trim() == passwordText){
				UnityEngine.Debug.Log ("Password Matches");
				password = passwordText;
				this.LoadUserFile();

			}
		}
		UnityEngine.Debug.Log ("Password NOT Match");	
	}


    void UserNotFound()
	{
		Debug.Log ("user not found Username: " + userNameText);
		Debug.Log ("User Not Found");
		cameraSwitcher.SendMessage("ChangeCamera");
		guiVisible = false;
	}

	void LoadUserFile()
	{
		UnityEngine.Debug.Log ("Load User File");
	}

	void CreateUser()
	{
		UnityEngine.Debug.Log ("Create New User");

	}
}

i figured this out.