Added model php functions for cookies, database user records, and ajax controler layer

Added canidates page. Added set_cookie and _red cookie functions. Added
AJAX controllers for user registration, redirect, and cookie discovery.