Fixes #4730, Fixed Auth_ORM::logged_in not working if $role is an ORM object.