the server code for Swipe2open