Fix login stub in tests