Add login/logout APIs.

This adds an API endpoint to get the currently logged in user,
log in a new user, and log out the current user via REST. The
current user is modeled as a resource, and we can GET, POST, or
DELETE it.