Fixed logout on registration