Test login method