Refactored out repeated db setup/calls into db_query()
Renamed user_login to less confusing username.
Now salts and hashes passwords.