Passing non-existent credentials should return null user

In getUserByIdentity, passing some credentials that don't exist like "token" actually returned a valid user when it shouldn't.

This commit fixes this behaviour. 

Also reverted the previous commit, that behaviour was also caused by this problem and seems to be fixed now.