separated logic from display. tweaked index to keep forms filled upon reloading.
fixed the html form to keep values from previous page after reloading new password