Adding Logout handler functionality