Finish user auth.

Change this to the
$.ajax({
  type: type,
  url: url
})

format to retain consistency across the project.