test: basic login/redirection

Add tests for logging in and redirecting to the right page.

Signed-off-by: Mark Walters <markwalters1009@gmail.com>
[rlb@defaultvalue.org: adjust commit summary; rebase on current
 master; fix whitespace]
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>