now using the uri to derive a method passed via authrep
cleaned up code a bit