Added support for login/logout of users