abstracted auth url and token to lib, it's working.

Signed-off-by: Chris Jones <chris@jonezy.org>