Merge safe_auth into master