merged from auth_2.0 branch