update login function with JSF way.