Implemented web api for security