Modified slightly for OAuth (hack)