NR-57 : Basic REST server components for handling gateway

Made a stable running version of security, still needs
some fine tuning.