More Backend Finished

Added Login Code, All Events Code, still need add event,
building touch algorithm and input checking code, bug fixes.