submit and cancel to redirect and setup sessions