Authentication system library for php