added adminhandling via database

not finally tested
added adminhandling via database