add login/logout functionality