upgrate auth functions