Authorization script for php