Posible fix for login refresh proble,
Merge pull request #787 from erwinwinder/master

Posible fix for login refresh proble,