Fixed re-direction issue with localhost for test and development