Fixed MySQL error, timeout not stopping and commands being allowed when not logged in