General purpose authentication and authorization service