refactor default layout and global.js
cleanup authenticated and added check for enabled moduler
cleanup authenticated and added check for enabled moduler
change function name to moduleEnabled