Make login view accept json instead of form encoded data.