Added security checks to controllers to ensure user is logged in and the requests are coming from portal.