add hook to generate authentication token in user model on save