fix all layout and add logic for login