Changing check_password and removing unnecessary things