Extension of the User component for storing and retrieving user state in session