Add factory and tests for User