I am a new programmer, and I have a couple of questions.

Before I ask, im sorry if its been done before, but im at a loss as to what to search for, as i have no idea how to even begin what id like to do.

Here is my code...

Code:
#include <iostream>
#include <string.h>
#include <string>
#include <dos.h>
#include <process.h>
#include <fstream>   // for files
#include <stdio.h>
#include <conio.h>


 
using namespace std;


string user;
string pass;
int main()
{

	cout << "Username :";

	cin >> user;
	if(user == "admin")
	{
		cout << "Password :";
	}
	else
	{	
		cout << "Incorrect username\n";
		return main();
	}
	cin>> pass;

	if(pass == "12345")
	{
      cout<< "Welcome.\n";
		
	}
	else 
	{
		return main();
	}


	system("pause");

	return 0;

}

After the console displays "welcome" id like it to allow the user to "press any key to continue..." ( getch;? ) to clear the screen.

After the screen clears, id like the user to be able to type in text that can be saved within the program, not an outside text file, so the text can only be accessed through logging in.

This will serve as a personal journal if you will.

How do i go about doing this?

Thank you guys.