moved restore session to application controller