User model and corresponding tests