added try/except to sign_out() function