Update "App" with login function complete and refactoring code