Fixed a regression for Flask Login >= 0.2