auth: added function to delete old tokens

Related to #399 and #400.
misc: fix git hooks tests