To implement your idea you have to apply md5 function on the login and password values before sending them over the internet. Right? In other words it should be don on the client side. You can do it with Javascript.
go to www.google.com and search for "Javascript MD5".
Once you have MD5 function in Javascript, you can do the following.
<form name="your_form" method="post" onSubmit="EncryptFrom(this)">
<input type="text" name="login">
<input type="password" name="pass">
</form>
function EncryptFrom would look like:
<script ...>
function EncryptFrom(the_form){
the_form.login.value = MD5String(the_form.login.value);
the_form.pass.value = MD5String(the_form.pass.value);
}
</script>
It's better to put this script in the Head. Implementtion of MD5String you should pick up somewhere on the net.
Another way to send the data securely is using https protocol.