Implemented auto redirecting