Private library for authentication