Implementation of session validity control and add message system to
communicate with the UI.