adds page and session functionality