init sign_in/sign_out function