Work on auth.
Fix bug on next_url.