fixes redirect issue on login