added user authentication and authorization