Organize the project and complete login function