changed cookies to sessions for security. Added home page. Some bugs fixed