Login now properly handles target uri redirecting.