refactor user_signin to test_helper function