Added security to rest controllers