Fix flask-login's get_id problem