Add SessionState class.
Use $.Deferred to modal popups.