OpenAM Javascript REST sample