Add not null check to repository methods
Add GenerateIdentity method to User entity
Add IoC container.