Implemented login/logout and attached to the GUI. Includes tests.

@kenmanheimer - for your review.

@merickson - you might also be interested in this one since it shows some actual progress.