update login function with JSF way.
update login function with JSF way.