improved test coverage in user spec