public void saveToFile()
	{
		//saves user and password to dat file
		//saves amount of users to another dat file
		try
		{
			RandomAccessFile info = new RandomAccessFile("info.dat","rw");
			RandomAccessFile numberOfVaribles = new RandomAccessFile("n.dat","rw");
			
			if(numberOfVaribles.length()>0)
			{
			numberOfVaribles.seek(0);
			int amountOfItems = (numberOfVaribles.readInt())+2;
			numberOfVaribles.seek(0);
			numberOfVaribles.writeInt(amountOfItems);
			numberOfVaribles.seek(0);
			info.seek(info.length());
			info.writeUTF(userName);
			info.writeInt(password);
			}
			else
			{
				info.writeUTF(userName);
				info.writeInt(password);
				numberOfVaribles.seek(0);
				numberOfVaribles.writeInt(2);
			}
			numberOfVaribles.close();
			info.close();
		} catch (FileNotFoundException e) {
			System.out.println("File not found!");
		} catch (IOException e) {
			System.out.println("IO Exception");
		}
	}