Implement and persist login procedures in the sample app.

Implement logging in via username/password and persisting it
in SharedPreferences.