New authorization functions

Split functions in 2 files, of which 1 new (for auth checks)
Updated gitignore