adding method autoRedirect
adding method autoRedirect