fixing redirect issue
can't use variable name location because it replaces window.location
Merge pull request #1 from rushton/hotfix/fix_redirect_issue

fixing redirect issue