added working authentication and roles system - still need to implement client stuff