Completing rest security on client and server