Various fixes and improvements for the auth models