completed authentification and autorization functionality