Improve security manager

-make AppSecurityManager code nicer
-reenable but add an exception for methodes which need enhanced
privileges to work properly
- Start working toward improving the situation given in #33.