add library for stateful beans, and minor update for loginbean