All of this is possible.
It sounds like you want to take an existing login form and turn it into a custom Joomla login module. Here is a link to Joomla's documentation on how to create a custom module.
http://docs.joomla.org/How_do_you_create_a_custom_module%3F
Here is another about modifying the Joomla Login module.
http://docs.joomla.org/Customising_the_Login_Form_module
There is no quick way for me to teach you how to do this but I would start by learning the Joomla Module structure and tearing apart (a backup of) the existing Joomla mod_login (login module) so you can understand how it works.
Then its just a task of mashing your custom PHP login page into it.
Not cut and dry but definitely possible.
A quick Google search yielded many results with people trying to modify customize the Joomla login process. I recommend you join the Joomla boards and start reading as much as you can about it.