Fixed major database issues

-Fixed issues where user table was linked to id instead of user_id
-Added foreign key category_id to notifications table