added authorization unit tests.