try catched the open of database in the login function
try catched the open of database in the login function