added logout function
 modified dbhelper