Finish member management code

main.php is in charge of handling all mySQL queries, and communicates
with main.js via JSON