db script for authentication and authorization