login :-
    getdata,
    writeln('Welcome!').
login :-
    repeat,
    writeln('Sorry, you are not permitted.'),
    getdata,
    writeln('Welcome').

getdata :-
    write('Username: '),
    read(Name),
    write('Password: '),
    read(Password),
    user(Name, Password).

user(john, john1).
user(jimmy, jimmy1).
user(mary, mary1).
