Login Functionality added to local database