json authentication and php