Prepare signin functions