There are two easy ways to encrypt your authentication. First, you could encrypt all your RMI communication using the secure socket layer (SSL). Information on how to do this is
here. You could also use a challenge/response algorythm where the server sends a random
test phrase and you use a password to find a cryptographic hash of the phrase or to send the encrypted phrase back to the server. The server then compares this response to what it expected and allows you to proceed if they match.