Refactor loading of user data (fixes #7) and fix #11 bug.