Implement tests for User class (fixes #133)