registration and db connectivity