Add support for view only passwords (continuation)

This is pull request #65 with some extra fixes.