better UI/logic for sign in