Fixed invalid cookie check
Merge pull request #357 from nlake44/redirect-fix

Fixed invalid cookie check