Use a 'string' for the variable 'login', and include <string>.
Wrap from right after you ask for the login name, to the end of the cin.get with a while(1) { }, then put a break; in the if statement, and put an else statement on that if statement that cout's "wrong username".
Code:
#include <string>
int main()
{
string pass;
string login;
cout<<"Hello, please enter your login: ";
while(1) {
cin >> login;
if (login == "john") {
cout << "Welcome, John/n";
break;
} else {
cout << "Invalid username, sorry./n";
}
}
cin.ignore();
cin.get();
}
You could also make the if statement: (login == "john" || login == "John" || login == "JOHN")