Add the controller method for auto redirecting
Add tests for auto redirecting
Merge branch 'feature/auto-redirect' into develop