Add FOREIGN keys, changed table layout and fixed some login / register bugs