Modularized the sign_in and sign_out ajax requests