Changed the implementation of user repository