code update with login and default layout.