Fixed custom user class bug with UserProvider

If you copy the User model and create a new one like `class Person implements UserInterface` it doesnt work with the current UserProvider.