Test automation identity

Hopefully final test for identity to change password. Also a small potential fix for flakiness of facebook signin and some refactorings.
A `tuple` is just a case class. :dancers: