added log out handler