database setting and user login