Added functional tests for logging in.