Update auth_ping to accept appid

Take appid as parameter to auth_ping to check app authorization.