added database connection to login dialog