Make Authentication API consistent everywhere.

Now the parameters order follows the scheme: database, user, password. Examples:
- Authenticate(db, user, password)
- db.authenticate(db, user, password)
- Authenticated(db, user) // Internal API