added user authentication functionality