Refactor sign_in blocks