Tweaking auth flow to cater for app.