Logout functionality implemented.