Bug fixes and tests

Fixed an issue with time zones not being updated on users and started to
build the repository unit tests.