Move checktoken to a protected method for easier change in the future if needed