Adding login and logout functionalities with user roles