Issue refs #1721: implement server side logic, add tests for logic and security