#2 - first part of built in authentication mechanism, based on Spring security