Moved code from SecurityMVCSpring PoC. Not tested to work yet
After tests and launch - working fine