added security for rest as well as website