refactored authentication service to handle roles more efficiently and abstracted rest calls into their own service