Check DB connection during the launching

The application will not start if there is an error with the database .
In this way we can avoid a lot of problems with the database and the
connection .

PS: The application will display an error message if you login with
incorrect username or password