added log out functinoality