def update_token(kind)
        @user.issue_token(kind)
        @user.save
        if kind == :reset_token
          user_mailer.password_reset(@user).deliver_later
        else
          user_mailer.email_verification(@user).deliver_later
        end
        render body: '', status: 204
      end
def update_token(kind)
        @user.issue_token(kind)
        @user.save
        if kind == :reset_token
          user_mailer.password_reset(@user).deliver_later
        else
          user_mailer.email_verification(@user).deliver_later
        end
        render body: '', status: 204
      end
This method updates user with a new reset token. Only used for this
 operation.