Small fixes. Develop authorizate_priviledged_users fuction
Remove old functions