use autoload_register
fix warning of undefined key in session array
add an AppModel