changed the after_create in the user model to a before_create