Implements secure login, login check, and logout.

l