added controller functionality for angularjs to the security controller