I'm thinking to make a little server, where for example, I host the server, and my friend goes on the client, the client is on my website. My friend enters his username+password, then the applet will look on the server's customers folder and check if there is a file named "username.txt", and if it is it will go on the file and check the password, and if they mach it will contunue, if not then it will go back to the login screen, but if the username does not exsit it will create a new file in the customers folder.
is there any good examples?
Sorry if that doensn't make sence.
Not really good examples as such. It's not a program that would be commonly used, as most user-password data is either in a database, or all stored in a single file. In any case, assuming you know file I/O, you just need to learn about sockets. You'll also need to think up a very small protocol (username-newline-password-newline?) for sending passwords. Anyways, a tutorial on sockets that I found useful is here:
Java Tutorials - Sockets