Fixes for handling custom User models