extract login/logout/resume functionality to handlers
Merge remote-tracking branch 'upstream/develop-2' into handlers
Merge pull request #16 from pmjones/develop-2

extract login/logout/resume behaviors to handlers