Add a dbapi function to check if an authorization exists

Adds a simple check to see if an authorization exists. Should have this in order for the "check if X already exists" code I'm writing for the admin interface.