fix login logout