add database ,login and logout