added spring security
small refactorings