Improve auth flow