add DB connection and register user function