Merge "Fix and add unittests for SecurityController"