Example for ajax auth. Refs #272, #238