Class representing a UserDelegate.
This class is a delegate for the User and Session interfaces. It overrides the logout function to remove the cached user from the context and sign off the user.
Function to log out the user.