Updated login process
Login controller now returns JSON rather than HTTP redirects
Plain controller will not save add url if a user is adding but not logged in
Login controller will return correct redirect path
logged in JS was updated to get message and redirect url dynamically from backend
Merge branch 'login' into release-v0.5.1