Fixed redirect issue with logout