refactored signin