added log in and out features