fixed most of database.php and looked put more work on user.php