improved the login and logout flow and used roxygen2