added user authentication

Passwords still needs salting inside the db, but the authentication is
working at least.