Improve LoginActivity and add some classes for communicating with the
server.