Added a login and logout function in UserBean.