if the session is invalid then it will delete the session