Added kind of a auth function