fix error page and session timeout