Use django authentication and handle next URLS. Issue #448.
Merge branch 'dev-issue448' into dev-cleanup