update: 
add form validation.
fix login,logout and register