Refactory in layout from login