Allowed a session to be supplied when initializing a db model.
Added the check_password() method for checking a password against the user's stored password.