Fixed bug when bumping to login page from within permission_p, but permission_p was called form within ad_get_login_url, which is the proc that determines which login page to use
optimization from Heidelberg: changing to use persons table instead of cc_users when restriction to registered/approved users is not needed and the persons table has all columns we need