User settings

This is a pull request for issues #455 and #456.

See how we are doing this in setting permissions code.