Add user authentication functionality.