Update, fix and comment the process of storing, updating and retrieving the user from the database