refactored test signin to method