try fix redirect loop bug on heroku