updated to work with new rauth, and underdogio's integrations, needs to be refactored