I think this has been discussed before and although I can't remember exactly what was said I think the overall conclusion was that it would be very hard to do and it is just easier for yourself and others to use the
https://www.yourdomainname.com/webmail link as there is no specific disadvantages to doing this. In place of the form you could have a link to this address which would bring up a secure username / password dialog.
Maybe someone else might be able to give you a bit more guidance if you are determined to create your own customised log in form.
Hope that helps

.