reworking relay and admin
todo: mysqldb