Inserting usernames and salted passwords is a go

Still reall messy. Database.php needs overhauled. I still don't understand namespaces. Please explain.