refact the project, add User class to make codes cleaner