added test for failed login; updated example