Merge pull request #1 from kokeszko/master

modified user privileges
small modifications sugested by pvs-studio