removing dead code, adding autoresize to tinymce
Memoize site variable
Added methods for resource checking in #authenticate for pages, sites and layouts