login page - rewritten

login page rewritten to use form states, and follow same coding method
as registration page.