Modifiying auth flow so that it will work better for us.